0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

New Tag in fixture breaks Tag tests

This commit is contained in:
Hannah Wolfe 2013-09-19 06:50:32 +01:00
parent fe5df2b0d1
commit 43fe50ca7b

View file

@ -134,7 +134,7 @@ describe('Tag Model', function () {
return TagModel.findAll();
}).then(function (tagsFromDB) {
tagsFromDB.length.should.eql(seededTagNames.length);
tagsFromDB.length.should.eql(seededTagNames.length + 1);
done();
}).then(null, done);
@ -181,7 +181,7 @@ describe('Tag Model', function () {
var tagModels = reloadedPost.related('tags').models,
tagNames = tagModels.map(function (t) { return t.attributes.name; });
tagNames.should.eql(['tag1', 'tag2', 'tag3']);
tagModels[2].id.should.eql(3); // make sure it hasn't just added a new tag with the same name
tagModels[2].id.should.eql(4); // make sure it hasn't just added a new tag with the same name
done();
}).then(null, done);