Sha256: 44c5db11228a8a9acd599ad66f18a893381307011347652a5caec95be5ad69e1
Contents?: true
Size: 1006 Bytes
Versions: 3
Compression:
Stored size: 1006 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', params: { email: @existing_user.email, password: 'secret123' } @resource = assigns(:resource) @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
3 entries across 3 versions & 2 rubygems