Sha256: 3a04d33a90ae4c1e86548e8c2e27cdaa255864dfc6bfecd44a9aa77ad3212383
Contents?: true
Size: 996 Bytes
Versions: 2
Compression:
Stored size: 996 Bytes
Contents
require 'test_helper' # was the web request successful? # was the user redirected to the right page? # was the user successfully authenticated? # was the correct object stored in the response? # was the appropriate message delivered in the json payload? class Overrides::RegistrationsControllerTest < ActionDispatch::IntegrationTest describe Overrides::RegistrationsController do before do @existing_user = evil_users(:confirmed_email_user) @existing_user.skip_confirmation! @existing_user.save! post '/evil_user_auth/sign_in', { evil_user: { email: @existing_user.email, password: 'secret123' } } @user = assigns(:user) @data = JSON.parse(response.body) end test "request should succeed" do assert_equal 200, response.status end test 'controller was overridden' do assert_equal Overrides::RegistrationsController::OVERRIDE_PROOF, @data['override_proof'] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
xing_backend_token_auth-0.1.32 | test/controllers/overrides/sessions_controller_test.rb |
xing_backend_token_auth-0.1.31 | test/controllers/overrides/sessions_controller_test.rb |