Skip to content

Commit

Permalink
Chore : Delete unused test and correct namings
Browse files Browse the repository at this point in the history
  • Loading branch information
Babali42 committed Oct 14, 2024
1 parent dd65d4c commit 9f348c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 26 deletions.
8 changes: 4 additions & 4 deletions src/app/adapters/secondary/genres-adapter.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { of, throwError } from 'rxjs';
import {GenresAdapterService} from "./genres-adapter.service";
import {Genre} from "../../domain/genre";

describe('HeroAdapterService', () => {
describe('GenreAdapterService', () => {
let service: GenresAdapterService;
let httpClientSpy: jasmine.SpyObj<HttpClient>;

Expand All @@ -21,14 +21,14 @@ describe('HeroAdapterService', () => {
});

it('should return expected genres', (done: DoneFn) => {
const expectedHeroes: Genre[] =
const expectedGenres: Genre[] =
[{ label: "A", subGenres: [] }, { label: "B", subGenres: [] }];

httpClientSpy.get.and.returnValue(of(expectedHeroes));
httpClientSpy.get.and.returnValue(of(expectedGenres));

service.getGenres().subscribe({
next: genres => {
expect(genres).toEqual(expectedHeroes);
expect(genres).toEqual(expectedGenres);
done();
},
error: done.fail
Expand Down
4 changes: 2 additions & 2 deletions src/app/adapters/secondary/genres-adapter.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import {Genre} from "../../domain/genre";
@Injectable({ providedIn: 'root' })
export class GenresAdapterService implements IManageGenres {

private heroesUrl = 'api/genres'; // URL to web api
private genresUrl = 'api/genres';

constructor(private http: HttpClient) { }

getGenres(): Observable<Genre[]> {
return this.http.get<Genre[]>(this.heroesUrl).pipe(
return this.http.get<Genre[]>(this.genresUrl).pipe(
catchError(this.handleHttpError())
);
}
Expand Down
20 changes: 0 additions & 20 deletions src/app/adapters/test.spec.ts

This file was deleted.

0 comments on commit 9f348c8

Please sign in to comment.