Test new species (plus minor cleanup)

This commit is contained in:
Matthew Dillon 2015-11-04 13:05:03 -07:00
parent 30e7000a81
commit 19ce579983
4 changed files with 21 additions and 1 deletions

View file

@ -54,3 +54,17 @@ test('editing /species/:id/edit', function(assert) {
});
});
});
test('creating /species/new', function(assert) {
visit(`/species/new`);
andThen(function() {
assert.equal(currentURL(), `/species/new`);
fillIn('.species-name', 'New Species Name');
click('.save-species');
andThen(function() {
assert.equal(find(".flakes-information-box > legend > em").text().trim(), 'New Species Name');
});
});
});