Skip to content

Commit faaf77c

Browse files
committed
Update tests
1 parent 3f57506 commit faaf77c

File tree

1 file changed

+31
-1
lines changed

1 file changed

+31
-1
lines changed

tests/integration/components/es-pagination-test.js

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module('Integration | Component | es-pagination', function (hooks) {
88

99
test('it renders', async function (assert) {
1010
await render(hbs`
11-
<EsPagination>
11+
<EsPagination @showPrevious={{true}} @showNext={{true}}>
1212
<:previous>
1313
Newer articles
1414
</:previous>
@@ -20,4 +20,34 @@ module('Integration | Component | es-pagination', function (hooks) {
2020

2121
assert.dom(this.element).hasText('Newer articles Older articles');
2222
});
23+
test('it renders only previous', async function (assert) {
24+
await render(hbs`
25+
<EsPagination @showPrevious={{true}} @showNext={{false}}>
26+
<:previous>
27+
Newer articles
28+
</:previous>
29+
<:next>
30+
Older articles
31+
</:next>
32+
</EsPagination>
33+
`);
34+
35+
assert.dom(this.element).hasText('Newer articles');
36+
assert.dom(this.element).doesNotIncludeText('Older articles');
37+
});
38+
test('it renders only next', async function (assert) {
39+
await render(hbs`
40+
<EsPagination @showPrevious={{false}} @showNext={{true}}>
41+
<:previous>
42+
Newer articles
43+
</:previous>
44+
<:next>
45+
Older articles
46+
</:next>
47+
</EsPagination>
48+
`);
49+
50+
assert.dom(this.element).hasText('Older articles');
51+
assert.dom(this.element).doesNotIncludeText('Newer articles');
52+
});
2353
});

0 commit comments

Comments
 (0)