Skip to content

Commit

Permalink
remove unused episode loader test
Browse files Browse the repository at this point in the history
  • Loading branch information
fredkingham committed Feb 25, 2017
1 parent c8e71b3 commit 28ef7ea
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions opal/static/js/test/servicesTest.js
Expand Up @@ -123,44 +123,6 @@ describe('services', function() {
});
});

describe('episodeLoader', function() {
var episodeLoader, $httpBackend;

beforeEach(function() {
module(function($provide) {
$provide.value('UserProfile', function(){ return profile; });
});

inject(function($injector) {
episodeLoader = $injector.get('episodeLoader');
$httpBackend = $injector.get('$httpBackend');
$rootScope = $injector.get('$rootScope');
$route = $injector.get('$route');
});
});

xit('should resolve to a single episode', function() {
// TODO unskip this
// Skipping this, because I can't work out how to set $route.current
// so that episodeLoader can access it.
var promise = episodeLoader();
var episode;

$route.current = {params: {id: 123}};
$httpBackend.whenGET('/schema/').respond(columns);
// TODO trailing slash?
$httpBackend.whenGET('/episode/123').respond(episodeData);
promise.then(function(value) {
episode = value;
});

$httpBackend.flush();
$rootScope.$apply();

expect(episode.id).toBe(123);
});
});

describe('UserProfile', function(){
var mock, $httpBackend, UserProfile;

Expand Down

0 comments on commit 28ef7ea

Please sign in to comment.