Skip to content
Snippets Groups Projects
Commit bc0bb9c1 authored by Dmitry Kovalenok's avatar Dmitry Kovalenok
Browse files

testing

parent 507dda03
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<%= link_to oauth_google_path do %> <%= link_to oauth_google_path do %>
<%= button_tag class: 'button-login' do %> <%= button_tag class: 'button-login' do %>
<%= image_tag('/plugin_assets/redmine_omniauth_google/images/google_login_icon.jpg', class: 'button-login-icon', alt: l(:login_via_google)) %> <%= image_tag('/plugin_assets/redmine_omniauth_google/images/google_login_icon.jpg', class: 'button-login-icon', alt: l(:login_via_google)) %>
<%= content_tag :div, 'Login_via_google', class: 'button-login-text' %> <%= content_tag :div, l(:login_via_google), class: 'button-login-text' %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
\ No newline at end of file
.button-login { .button-login {
position: absolute; position: relative;
left: 40%; left: 45%;
display: inline-block; display: inline-block;
border: 1px solid #999; border: 1px solid #999;
border-radius: 2px; border-radius: 2px;
margin-top: 5px; margin-top: 10px;
width: 135px; width: 135px;
height: 25px; height: 25px;
padding: 0; padding: 0;
......
...@@ -98,4 +98,19 @@ class RedmineOauthControllerTest < ActionController::TestCase ...@@ -98,4 +98,19 @@ class RedmineOauthControllerTest < ActionController::TestCase
assert user assert user
assert_equal User::STATUS_REGISTERED, user.status assert_equal User::STATUS_REGISTERED, user.status
end end
def test_oauth_google_callback_with_not_allowed_email_domain
Setting.plugin_redmine_omniauth_google[:allowed_domains] = "twinslash.com"
set_response_body_stub
get :oauth_google_callback
assert_redirected_to :signin
end
def test_oauth_google_callback_with_allowed_email_domain
Setting.self_registration = '3'
Setting.plugin_redmine_omniauth_google[:allowed_domains] = parse_email(@default_response_body[:email])[:domain]
set_response_body_stub
get :oauth_google_callback
assert_redirected_to controller: 'my', action: 'account'
end
end end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment