Skip to content

Commit 31a5e30

Browse files
committed
Update tests
1 parent 1f7ad83 commit 31a5e30

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

tests/unit/LaravelVuePagination.spec.js

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,36 @@ describe('LaravelVuePagination', function() {
172172
expect(wrapper.findAll('li').length).toBe(7);
173173
expect(wrapper.findAll('li').at(0).element.classList).toContain('active');
174174
});
175-
});
175+
176+
it('has correct size', function() {
177+
let wrapper = getComponent(LaravelVuePagination, {
178+
data: exampleData,
179+
size: 'small'
180+
});
181+
182+
expect(wrapper.find('.pagination').element.classList).toContain('pagination-sm');
183+
184+
wrapper = getComponent(LaravelVuePagination, {
185+
data: exampleData,
186+
size: 'large'
187+
});
188+
189+
expect(wrapper.find('.pagination').element.classList).toContain('pagination-lg');
190+
});
191+
192+
it('has correct align', function() {
193+
let wrapper = getComponent(LaravelVuePagination, {
194+
data: exampleData,
195+
align: 'center'
196+
});
197+
198+
expect(wrapper.find('.pagination').element.classList).toContain('justify-content-center');
199+
200+
wrapper = getComponent(LaravelVuePagination, {
201+
data: exampleData,
202+
align: 'right'
203+
});
204+
205+
expect(wrapper.find('.pagination').element.classList).toContain('justify-content-end');
206+
});
207+
});

0 commit comments

Comments
 (0)