mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-04 04:04:36 +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
|
end
|
||||||
|
|
||||||
@valid_headers =
|
@valid_headers =
|
||||||
{ 'Authorization': 'Bearer ' + generate_token(@user.id) }
|
{ 'Authorization': 'Bearer ' + generate_token(@user.id),
|
||||||
|
'Content-Type': 'application/json' }
|
||||||
|
|
||||||
@valid_hash_body = { data:
|
@valid_hash_body = { data:
|
||||||
{ type: 'inventory_items',
|
{ type: 'inventory_items',
|
||||||
|
@ -141,10 +142,6 @@ RSpec.describe 'Api::V1::InventoryItemsController', type: :request do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'POST inventory_item, #create' do
|
describe 'POST inventory_item, #create' do
|
||||||
before :all do
|
|
||||||
@valid_headers['Content-Type'] = 'application/json'
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'Response with correct inventory item' do
|
it 'Response with correct inventory item' do
|
||||||
hash_body = nil
|
hash_body = nil
|
||||||
post api_v1_team_inventory_items_path(
|
post api_v1_team_inventory_items_path(
|
||||||
|
|
Loading…
Add table
Reference in a new issue