Refactor species/show

This commit is contained in:
Matthew Dillon 2015-11-03 09:22:04 -07:00
parent 2b2489a35a
commit d1e3d05db2
8 changed files with 106 additions and 69 deletions

View file

@ -27,3 +27,13 @@ test('visiting /species', function(assert) {
assert.equal(find("#total-species").text(), "Total species: 20");
});
});
test('visiting /species/:id', function(assert) {
const species = server.create('species');
visit(`/species/${species.id}`);
andThen(function() {
assert.equal(currentURL(), `/species/${species.id}`);
assert.equal(find(".flakes-information-box > legend > em").text().trim(), species.speciesName);
});
});