mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Move @valid_headers content type to global @valid_headers def
This commit is contained in:
parent
212bdfeffe
commit
d0d0939afd
1 changed files with 2 additions and 5 deletions
|
@ -43,7 +43,8 @@ RSpec.describe 'Api::V1::InventoryItemsController', type: :request do
|
|||
end
|
||||
|
||||
@valid_headers =
|
||||
{ 'Authorization': 'Bearer ' + generate_token(@user.id) }
|
||||
{ 'Authorization': 'Bearer ' + generate_token(@user.id),
|
||||
'Content-Type': 'application/json' }
|
||||
|
||||
@valid_hash_body = { data:
|
||||
{ type: 'inventory_items',
|
||||
|
@ -141,10 +142,6 @@ RSpec.describe 'Api::V1::InventoryItemsController', type: :request do
|
|||
end
|
||||
|
||||
describe 'POST inventory_item, #create' do
|
||||
before :all do
|
||||
@valid_headers['Content-Type'] = 'application/json'
|
||||
end
|
||||
|
||||
it 'Response with correct inventory item' do
|
||||
hash_body = nil
|
||||
post api_v1_team_inventory_items_path(
|
||||
|
|
Loading…
Reference in a new issue