DEV: Rails 5.2 upgrade and global gem upgrade

This updates tests to use latest rails 5 practice
and updates ALL dependencies that could be updated

Performance testing shows that performance has not regressed
if anything it is marginally faster now.
This commit is contained in:
Sam
2018-06-05 17:29:17 +10:00
parent 2bd905c632
commit 89ad2b5900
103 changed files with 900 additions and 864 deletions

View File

@ -33,7 +33,7 @@ RSpec.describe Admin::EmailTemplatesController do
sign_in(admin)
get '/admin/customize/email_templates.json'
expect(response).to be_success
expect(response).to be_successful
json = ::JSON.parse(response.body)
expect(json['email_templates']).to be_present
@ -66,7 +66,7 @@ RSpec.describe Admin::EmailTemplatesController do
email_template: { subject: 'Foo', body: 'Bar' }
}, headers: headers
expect(response).not_to be_success
expect(response).not_to be_successful
json = ::JSON.parse(response.body)
expect(json['error_type']).to eq('not_found')
@ -169,7 +169,7 @@ RSpec.describe Admin::EmailTemplatesController do
email_template: { subject: email_subject, body: email_body }
}, headers: headers
expect(response).to be_success
expect(response).to be_successful
json = ::JSON.parse(response.body)
expect(json).to be_present
@ -237,7 +237,7 @@ RSpec.describe Admin::EmailTemplatesController do
it "returns 'not found' when an unknown email template id is used" do
delete '/admin/customize/email_templates/non_existent_template', headers: headers
expect(response).not_to be_success
expect(response).not_to be_successful
json = ::JSON.parse(response.body)
expect(json['error_type']).to eq('not_found')
@ -265,7 +265,7 @@ RSpec.describe Admin::EmailTemplatesController do
it "returns the restored email template" do
delete '/admin/customize/email_templates/user_notifications.admin_login', headers: headers
expect(response).to be_success
expect(response).to be_successful
json = ::JSON.parse(response.body)
expect(json).to be_present