- A
- C
- D
- E
- P
- S
- U
- V
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 6 def setup 7 DeviseTokenAuth.cookie_attributes[:secure] = false 8 DeviseTokenAuth.cookie_attributes[:domain] = :all 9 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 38 def assert_response_forbidden 39 assert_equal 403, response.status 40 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 42 def assert_response_not_found 43 assert_equal 404, response.status 44 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 30 def assert_response_ok 31 assert_equal 200, response.status 32 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 79 def current_access_token 80 parsed_auth_cookie["access-token"] 81 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 83 def delete_user_tokens(user = nil) 84 (user || @current_user).reload.update tokens: {} 85 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 67 def parsed_response 68 JSON.parse response.body 69 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 87 def serialized_user(user = @current_user) 88 { 89 "id" => user.id, 90 "provider" => "email", 91 "uid" => user.email, 92 "name" => user.name, 93 "nickname" => user.nickname, 94 "image" => user.image, 95 "email" => user.email, 96 "allow_password_change" => false, 97 "approved" => true 98 } 99 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 57 def sign_in(user = nil) 58 @current_user = user || create(:user) 59 post "/api/auth/sign_in", params: { 60 email: @current_user.email, 61 password: @current_user.password 62 }, as: :json 63 assert_response_ok 64 assert response.cookies[DeviseTokenAuth.cookie_name], "Auth cookie #{DeviseTokenAuth.cookie_name} not present" 65 end
Source: show
# File rhino/rhino/lib/rhino/test_case/controller.rb 26 def sign_out(params: {}, headers: {}) 27 delete "/api/auth/sign_out", params: params, headers: headers 28 end