Created
January 12, 2014 14:32
-
-
Save dbouwman/8385264 to your computer and use it in GitHub Desktop.
Spec showing loading json from a fixture
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('loads itself from json', function () { | |
var model, fisherJson, json; | |
beforeEach(function() { | |
json = getJSONFixture('entities/Dataset/dataset.json'); | |
model = new Composer.Models.Dataset({id:'a0818dca49bf4d5badd7d2b0fcbb51c9_5'}); | |
model.loadFromJson(json); | |
}); | |
it('sets the version', function() { | |
expect(model.get('current_version')).toEqual(json.data.current_version); | |
}); | |
//lots more tests removed for brevity | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment