Commit e97ae87b6928f26f6dff5a7d2fb61a459a209891

Authored by ABNER SILVA DE OLIVEIRA
1 parent 5ef3ec06

fixed some small tslint warnings

src/app/components/language-selector/language-selector.component.spec.ts
@@ -14,7 +14,7 @@ describe("Components", () => { @@ -14,7 +14,7 @@ describe("Components", () => {
14 let translatorService: any; 14 let translatorService: any;
15 15
16 let buildComponent = (): Promise<ComponentFixture> => { 16 let buildComponent = (): Promise<ComponentFixture> => {
17 - translatorService = jasmine.createSpyObj("translatorService", ["availableLanguages", "currentLanguage"]) 17 + translatorService = jasmine.createSpyObj("translatorService", ["availableLanguages", "currentLanguage"]);
18 return helpers.quickCreateComponent({ 18 return helpers.quickCreateComponent({
19 template: "<language-selector></language-selector>", 19 template: "<language-selector></language-selector>",
20 directives: [LanguageSelector], 20 directives: [LanguageSelector],
src/app/index.module.ts
@@ -15,13 +15,13 @@ export class NoosferoApp { @@ -15,13 +15,13 @@ export class NoosferoApp {
15 * @returns {string} the name of this application ('noosferoApp') 15 * @returns {string} the name of this application ('noosferoApp')
16 */ 16 */
17 static appName: string = "noosferoApp"; 17 static appName: string = "noosferoApp";
18 - 18 +
19 /** 19 /**
20 * @ngdoc property 20 * @ngdoc property
21 * @name angularModule 21 * @name angularModule
22 * @propertyOf NoosferoApp 22 * @propertyOf NoosferoApp
23 * @returns {any} all the modules installed for this application 23 * @returns {any} all the modules installed for this application
24 - */ 24 + */
25 static angularModule: any; 25 static angularModule: any;
26 26
27 /** 27 /**
src/lib/ng-noosfero-api/http/article.service.spec.ts
@@ -63,7 +63,7 @@ describe(&quot;Services&quot;, () =&gt; { @@ -63,7 +63,7 @@ describe(&quot;Services&quot;, () =&gt; {
63 it("should create an article in a profile", (done) => { 63 it("should create an article in a profile", (done) => {
64 let profileId = 1; 64 let profileId = 1;
65 let article: noosfero.Article = <any>{ id: null}; 65 let article: noosfero.Article = <any>{ id: null};
66 - $httpBackend.expectPOST(`/api/v1/profiles/${profileId}/articles`, article).respond(200, {article: { id: 2 }}); 66 + $httpBackend.expectPOST(`/api/v1/profiles/${profileId}/articles`, { article: article }).respond(200, {article: { id: 2 }});
67 articleService.createInProfile(<noosfero.Profile>{id: profileId}, article).then((result: noosfero.RestResult<noosfero.Article>) => { 67 articleService.createInProfile(<noosfero.Profile>{id: profileId}, article).then((result: noosfero.RestResult<noosfero.Article>) => {
68 expect(result.data).toEqual({ id: 2 }); 68 expect(result.data).toEqual({ id: 2 });
69 done(); 69 done();
src/lib/ng-noosfero-api/http/article.service.ts
@@ -28,7 +28,7 @@ export class ArticleService extends RestangularService&lt;noosfero.Article&gt; { @@ -28,7 +28,7 @@ export class ArticleService extends RestangularService&lt;noosfero.Article&gt; {
28 (<any>profileElement).id = profile.id; 28 (<any>profileElement).id = profile.id;
29 let headers = { 29 let headers = {
30 'Content-Type': 'application/json' 30 'Content-Type': 'application/json'
31 - } 31 + };
32 return this.create(article, <noosfero.RestModel>profileElement, null, headers); 32 return this.create(article, <noosfero.RestModel>profileElement, null, headers);
33 } 33 }
34 34
@@ -67,7 +67,7 @@ export class ArticleService extends RestangularService&lt;noosfero.Article&gt; { @@ -67,7 +67,7 @@ export class ArticleService extends RestangularService&lt;noosfero.Article&gt; {
67 67
68 getOneByProfile<T>(profile: noosfero.Profile, params?: any): ng.IPromise<noosfero.RestResult<noosfero.Article>> { 68 getOneByProfile<T>(profile: noosfero.Profile, params?: any): ng.IPromise<noosfero.RestResult<noosfero.Article>> {
69 let profileElement = this.profileService.get(<number>profile.id); 69 let profileElement = this.profileService.get(<number>profile.id);
70 - return this.getSub(profileElement, params);; 70 + return this.getSub(profileElement, params);
71 } 71 }
72 72
73 getChildren<T>(article: noosfero.Article, params?: any): ng.IPromise<noosfero.RestResult<noosfero.Article[]>> { 73 getChildren<T>(article: noosfero.Article, params?: any): ng.IPromise<noosfero.RestResult<noosfero.Article[]>> {