Mercurial > hg > ugly-duckling
changeset 22:3e96bcbfa5c5
Remove unused test service.
author | Lucas Thompson <dev@lucas.im> |
---|---|
date | Fri, 28 Oct 2016 17:21:58 +0100 |
parents | d9c0a1ca005c |
children | 1ff1b5bdeb9e |
files | src/app/app.component.ts src/app/app.module.ts src/app/mail.service.spec.ts src/app/mail.service.ts |
diffstat | 4 files changed, 0 insertions(+), 43 deletions(-) [+] |
line wrap: on
line diff
--- a/src/app/app.component.ts Fri Oct 28 16:27:25 2016 +0100 +++ b/src/app/app.component.ts Fri Oct 28 17:21:58 2016 +0100 @@ -1,5 +1,4 @@ import {Component, Inject} from '@angular/core'; -import {MailService} from "./mail.service"; @Component({ selector: 'app-root', @@ -13,12 +12,10 @@ audioBuffer: AudioBuffer = undefined; constructor( - private mail: MailService, @Inject('piper-server-uri') private serverUri ) {} onUpdate(id, text) { - this.mail.update(id, text); } onAudioLoaded(buffer: AudioBuffer) {
--- a/src/app/app.module.ts Fri Oct 28 16:27:25 2016 +0100 +++ b/src/app/app.module.ts Fri Oct 28 17:21:58 2016 +0100 @@ -4,7 +4,6 @@ import { HttpModule } from '@angular/http'; import { AppComponent } from './app.component'; -import {MailService} from "./mail.service"; import {MaterialModule} from "@angular/material"; import { WaveformComponent } from './waveform/waveform.component'; import { AudioFileOpenComponent } from './audio-file-open/audio-file-open.component'; @@ -24,7 +23,6 @@ MaterialModule.forRoot() ], providers: [ - MailService, {provide: 'piper-server-uri', useValue: 'ws://not/a/real/path'} ], bootstrap: [AppComponent]
--- a/src/app/mail.service.spec.ts Fri Oct 28 16:27:25 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -/* tslint:disable:no-unused-variable */ - -import { TestBed, async, inject } from '@angular/core/testing'; -import { MailService } from './mail.service'; - -describe('Service: Mail', () => { - beforeEach(() => { - TestBed.configureTestingModule({ - providers: [MailService] - }); - }); - - it('should ...', inject([MailService], (service: MailService) => { - expect(service).toBeTruthy(); - })); -});
--- a/src/app/mail.service.ts Fri Oct 28 16:27:25 2016 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable() -export class MailService { - - messages = [ - {id: 0, text: `You've got mail!`}, - {id: 1, text: `No Mail!`}, - {id: 2, text: `Spam!`} - ]; - - constructor() { } - - update(id, text) { - this.messages = this.messages.map(message => - message.id === id - ? {id, text} - : message - ) - } - -}