# HG changeset patch # User Lucas Thompson # Date 1477671718 -3600 # Node ID 3e96bcbfa5c59f0101670cbde79294dda06c6006 # Parent d9c0a1ca005c366e07ba11601d859f72b5b9a131 Remove unused test service. diff -r d9c0a1ca005c -r 3e96bcbfa5c5 src/app/app.component.ts --- 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) { diff -r d9c0a1ca005c -r 3e96bcbfa5c5 src/app/app.module.ts --- 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] diff -r d9c0a1ca005c -r 3e96bcbfa5c5 src/app/mail.service.spec.ts --- 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(); - })); -}); diff -r d9c0a1ca005c -r 3e96bcbfa5c5 src/app/mail.service.ts --- 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 - ) - } - -}