Skip to content

Commit 045b0e8

Browse files
committed
Narrow test fixtures in single test
1 parent 4103c8f commit 045b0e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tests/acceptance/crate-test.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ module('Acceptance | crate page', function(hooks) {
6161
});
6262

6363
test('visiting a crate page from the front page', async function(assert) {
64-
this.server.create('crate', 'withVersion', { id: 'nanomsg' });
64+
this.server.create('crate', { id: 'nanomsg', newest_version: '0.6.1' });
65+
this.server.create('version', { crate: 'nanomsg', num: '0.6.1' });
6566

6667
await visit('/');
6768
await click('[data-test-just-updated] [data-test-crate-link="0"]');
6869

69-
assert.equal(currentURL(), '/crates/nanomsg/6.8.9');
70+
assert.equal(currentURL(), '/crates/nanomsg/0.6.1');
7071
assert.equal(title(), 'nanomsg - crates.io: Rust Package Registry');
72+
73+
assert.dom('[data-test-heading] [data-test-crate-name]').hasText('nanomsg');
74+
assert.dom('[data-test-heading] [data-test-crate-version]').hasText('0.6.1');
7175
});
7276

7377
test('visiting /crates/nanomsg', async function(assert) {

0 commit comments

Comments
 (0)