Add tests for ProceduresDecorator
This commit is contained in:
parent
4de9ce4ac2
commit
0f2013f002
1 changed files with 20 additions and 0 deletions
20
spec/decorators/procedures_decorator_spec.rb
Normal file
20
spec/decorators/procedures_decorator_spec.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe ProceduresDecorator do
|
||||
|
||||
before do
|
||||
create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10))
|
||||
create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10))
|
||||
create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10))
|
||||
end
|
||||
|
||||
let(:procedure) { Procedure.all.paginate(page: 1) }
|
||||
|
||||
subject { procedure.decorate }
|
||||
|
||||
it { expect(subject.current_page).not_to be_nil }
|
||||
it { expect(subject.per_page).not_to be_nil }
|
||||
it { expect(subject.offset).not_to be_nil }
|
||||
it { expect(subject.total_entries).not_to be_nil }
|
||||
it { expect(subject.total_pages).not_to be_nil }
|
||||
end
|
Loading…
Reference in a new issue