Skip to content

Commit

Permalink
another failing test because stub has not been called.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhodine-orleans-lindsay committed Jan 31, 2020
1 parent 1688d72 commit 7d801ab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion JavaScriptAirport/spec/airportSpec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
'use strict'
describe('Airport', function(){
var airport;
var plane;
beforeEach(function(){
airport = new Airport();
plane = jasmine.createSpyObj('plane', ['clearForLanding']);
});
it('can land at airport', function() {
it('allows plane to land at airport', function() {
expect(airport.land).not.toBeUndefined()
});
it('planes can land at airport', function(){
airport.land(plane);
expect(plane.clearForLanding).toHaveBeenCalledWith(airport);
});
it('has no planes by default', function(){
expect(airport.planes()).toEqual([]);
});
Expand Down

0 comments on commit 7d801ab

Please sign in to comment.