test/integration/auth_controller_test.rb in opro-0.0.3 vs test/integration/auth_controller_test.rb in opro-0.1.0
- old
+ new
@@ -19,20 +19,20 @@
assert_equal '/oauth/new', current_path
click_button 'oauthAuthorize'
end
- access_grant = Oauth::AuthGrant.where(:user_id => @user.id, :application_id => @app.id).first
+ access_grant = Opro::Oauth::AuthGrant.where(:user_id => @user.id, :application_id => @app.id).first
assert_equal @redirect_uri, current_path
assert access_grant.present?
assert access_grant.can?(:write) # write access is checked by default
end
test 'user can remove permissions' do
as_user(@user).visit oauth_new_path(:client_id => @app.client_id, :redirect_uri => @redirect_uri)
uncheck('permissions_write') # uncheck write access
click_button 'oauthAuthorize'
- access_grant = Oauth::AuthGrant.where(:user_id => @user.id, :application_id => @app.id).first
+ access_grant = Opro::Oauth::AuthGrant.where(:user_id => @user.id, :application_id => @app.id).first
refute access_grant.can?(:write)
end
end