updating Gemfile.lock

parent a7c4fd2c
gem 'oauth2'
gem 'json'
group :development, :test do
gem 'pry'
end
\ No newline at end of file
gem 'json'
\ No newline at end of file
GEM
specs:
addressable (2.3.2)
faraday (0.7.6)
addressable (~> 2.2)
multipart-post (~> 1.1)
rack (~> 1.1)
json (1.7.5)
multi_json (1.3.6)
multipart-post (1.1.5)
oauth2 (0.5.2)
faraday (~> 0.7)
multi_json (~> 1.0)
rack (1.4.1)
PLATFORMS
ruby
DEPENDENCIES
json
oauth2
......@@ -11,19 +11,27 @@ class RedmineOauthControllerTest < ActionController::TestCase
OAuth2::Response.any_instance.stubs(body: body.to_json)
end
def test_login_with_omniauth_for_new_user
Setting.self_registration = '3'
def new_user options = nil
user_credentials = {:firstname => 'Cool',
:lastname => 'User',
:mail => 'user@somedomain.com'}
User.where(user_credentials).delete_all
new_user = User.new(user_credentials)
new_user.login = 'cool_user'
:mail => 'user@somedomain.com'}.merge(options)
user = User.new(user_credentials)
user.login = options[:login] || 'cool_user'
user
end
def test_login_with_omniauth_for_new_user
Setting.self_registration = '3'
user
set_response_body_stub({verified_email: "true", name: [new_user.firstname, new_user.lastname]*" ", given_name: new_user.firstname, family_name: new_user.lastname, email: new_user.mail})
get :oauth_google_callback, :email => new_user.mail
assert_redirected_to controller: 'my', action: 'account'
end
def test_login_with_invalid_oauth_provider
Setting.self_registration = '0'
end
#assert existing_user.save!
end
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment