[Rails5] Fix spec/services/applications/create_service_spec.rb
What does this MR do?
In Rails 5 the ActionController::TestRequest#new
requires two arguments: env
and session
.
In Rails 4 this method required only the env
argument, and session
was implicitly set to ActionController::TestSession.new
.
This MR explicitly adds the session
argument to fix the error:
1) Applications::CreateService creates an application
Failure/Error: let(:request) { ActionController::TestRequest.new(remote_ip: '127.0.0.1') }
ArgumentError:
wrong number of arguments (given 1, expected 2)
# ./spec/services/applications/create_service_spec.rb:6:in `new'
# ./spec/services/applications/create_service_spec.rb:6:in `block (2 levels) in <top (required)>'
# ./spec/services/applications/create_service_spec.rb:11:in `block (3 levels) in <top (required)>'
# ./spec/services/applications/create_service_spec.rb:11:in `block (2 levels) in <top (required)>'
Are there points in the code the reviewer needs to double check?
No.
Why was this MR needed?
Screenshots (if relevant)
No.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added -
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)