Skip to content

Commit

Permalink
update spec file
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Jan 19, 2025
1 parent 6cc3efa commit 7dc7849
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/controllers/checked_items_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@
it 'assigns a newly created checked_item as @checked_item' do
old_count = items(:item_00021).manifestation.reserves.waiting.count
post :create, params: { checked_item: { item_identifier: '00021' }, basket_id: 11 }
expect(items(:item_00021).user_reservation(Basket.find(11).user)).to be_truthy
expect(assigns(:checked_item)).not_to be_valid
expect(assigns(:checked_item).errors[:base]).to include(I18n.t('activerecord.errors.messages.checked_item.reserved_item_included'))
assigns(:checked_item).item.manifestation.reserves.waiting.count.should eq old_count
assigns(:checked_item).librarian.should eq users(:admin)
end
Expand Down

0 comments on commit 7dc7849

Please sign in to comment.