Skip to content

Commit 666a5f4

Browse files
committed
Test: Adds missing test coverage for 'print unfulfilled' request UI
1 parent 2abc01c commit 666a5f4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

spec/system/request_system_spec.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,22 @@
244244
end
245245
end
246246

247+
context "#print_unfulfilled" do
248+
let(:partner1) { create(:partner, organization: organization) }
249+
let(:partner_user) { partner1.primary_user }
250+
let!(:pending_request) { create(:request, :with_item_requests, :pending, partner: partner1, request_items: [{ "item_id": item1.id, "quantity": '100' }]) }
251+
252+
before(:each) do
253+
partner_user.add_role(Role::ORG_ADMIN, organization)
254+
sign_in(partner_user)
255+
end
256+
257+
it 'should render a link if there are unfulfilled requests' do
258+
visit requests_path
259+
expect(page).to have_link "Print Unfulfilled Picklists"
260+
end
261+
end
262+
247263
describe 'canceling a request as a bank user' do
248264
let!(:request) { create(:request, organization: organization) }
249265

0 commit comments

Comments
 (0)