Skip to content

Instantly share code, notes, and snippets.

@dbouwman
Created January 12, 2014 14:32
Show Gist options
  • Save dbouwman/8385264 to your computer and use it in GitHub Desktop.
Save dbouwman/8385264 to your computer and use it in GitHub Desktop.
Spec showing loading json from a fixture
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