Skip to content

Commit 7d30efc

Browse files
committed
fix test errors
1 parent 8bda117 commit 7d30efc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

test/integration/resource_items_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ def test_autocomplete
6565

6666
log_user 'jsmith', 'jsmith'
6767

68-
xhr :get, '/projects/ecookbook/resource_items/autocomplete', { q: 'so'}
68+
get '/projects/ecookbook/resource_items/autocomplete', params: { q: 'so'}, xhr: true
6969
assert_response 403
7070

7171
Role.find(1).add_permission! :manage_issue_resources
72-
xhr :get, '/projects/ecookbook/resource_items/autocomplete', { q: 'so'}
72+
get '/projects/ecookbook/resource_items/autocomplete', params: { q: 'so'}, xhr: true
7373
assert_response :success
7474
assert_select 'label', text: 'some item'
7575
end

test/integration/supply_items_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def test_supply_item_stock_change
3232

3333
i = SupplyItem.generate! stock: 1.5, project: @project
3434

35-
xhr :get, "/projects/ecookbook/supply_items/#{i.id}/stock"
35+
get "/projects/ecookbook/supply_items/#{i.id}/stock", xhr: true
3636
assert_response :success
3737

38-
xhr :patch, "/projects/ecookbook/supply_items/#{i.id}/stock", supply_item_stock_update: { stock_change: '1.2', comment: 'neuzugang' }
38+
patch "/projects/ecookbook/supply_items/#{i.id}/stock", params: { supply_item_stock_update: { stock_change: '1.2', comment: 'neuzugang' } }, xhr: true
3939
assert_response :success
4040

4141
i.reload

test/unit/update_stock_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require_relative '../test_helper'
22

33
class UpdateStockTest < ActiveSupport::TestCase
4-
self.use_transactional_fixtures = false
4+
self.use_transactional_tests = false
55

66
fixtures :projects
77

0 commit comments

Comments
 (0)