diff options
author | S.H <gamelinks007@gmail.com> | 2018-08-12 19:25:23 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-08-12 12:25:23 +0200 |
commit | 2aeeffc3ec421111f751cab61a15642cbddd9f0d (patch) | |
tree | 5ff9830f748e74495525b00f29591df19cbeadaa /spec/controllers/api/salmon_controller_spec.rb | |
parent | 110b3f63352e85c6ac138918b285d963382ce623 (diff) |
Update Rails (#8141)
* Update Rails * fix Update Rails
Diffstat (limited to 'spec/controllers/api/salmon_controller_spec.rb')
-rw-r--r-- | spec/controllers/api/salmon_controller_spec.rb | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/controllers/api/salmon_controller_spec.rb b/spec/controllers/api/salmon_controller_spec.rb index 5f01f8073..8ce4913a5 100644 --- a/spec/controllers/api/salmon_controller_spec.rb +++ b/spec/controllers/api/salmon_controller_spec.rb @@ -15,8 +15,7 @@ RSpec.describe Api::SalmonController, type: :controller do describe 'POST #update' do context 'with valid post data' do before do - request.env['RAW_POST_DATA'] = File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml')) - post :update, params: { id: account.id } + post :update, params: { id: account.id }, body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml')) end it 'contains XML in the request body' do @@ -42,8 +41,7 @@ RSpec.describe Api::SalmonController, type: :controller do context 'with empty post data' do before do - request.env['RAW_POST_DATA'] = '' - post :update, params: { id: account.id } + post :update, params: { id: account.id }, body: '' end it 'returns http client error' do @@ -56,8 +54,7 @@ RSpec.describe Api::SalmonController, type: :controller do service = double(call: false) allow(VerifySalmonService).to receive(:new).and_return(service) - request.env['RAW_POST_DATA'] = File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml')) - post :update, params: { id: account.id } + post :update, params: { id: account.id }, body: File.read(File.join(Rails.root, 'spec', 'fixtures', 'salmon', 'mention.xml')) end it 'returns http client error' do |