Sha256: 51eb5bca35395985cdfa75fb1ceefb1507030f1515c21ccc280507f54412d0e3
Contents?: true
Size: 961 Bytes
Versions: 11
Compression:
Stored size: 961 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', { 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
11 entries across 11 versions & 1 rubygems