Sha256: 03d33af821cb94ee115fda66170a1bb85bd98bd2c4b054343de530d094fe66e6

Contents?: true

Size: 838 Bytes

Versions: 21

Compression:

Stored size: 838 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'

class Custom::ConfirmationsControllerTest < ActionController::TestCase
  describe Custom::ConfirmationsController do
    include CustomControllersRoutes

    before do
      @redirect_url = Faker::Internet.url
      @new_user = create(:user)
      @new_user.send_confirmation_instructions(redirect_url: @redirect_url)
      @mail          = ActionMailer::Base.deliveries.last
      @token         = @mail.body.match(/confirmation_token=([^&]*)&/)[1]
      @client_config = @mail.body.match(/config=([^&]*)&/)[1]

      get :show,
          params: { confirmation_token: @token, redirect_url: @redirect_url }
    end

    test 'yield resource to block on show success' do
      assert @controller.show_block_called?, 'show failed to yield resource to provided block'
    end
  end
end

Version data entries

21 entries across 21 versions & 7 rubygems

Version Path
devise_token_auth-1.2.1 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-1.2.0 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-1.1.5 test/controllers/custom/custom_confirmations_controller_test.rb
sidecar_token_auth-1.0.1 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-1.1.4 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth_multitenancy-1.1.3.2 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth_multitenancy-1.1.3.1 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth_multitenancy-1.1.3.alpha1 test/controllers/custom/custom_confirmations_controller_test.rb
devise_jwt_auth-0.1.5 test/controllers/custom/custom_confirmations_controller_test.rb
devise_jwt_auth-0.1.4 test/controllers/custom/custom_confirmations_controller_test.rb
devise_jwt_auth-0.1.3 test/controllers/custom/custom_confirmations_controller_test.rb
devise_jwt_auth-0.1.2 test/controllers/custom/custom_confirmations_controller_test.rb
devise_jwt_auth-0.1.1 test/controllers/custom/custom_confirmations_controller_test.rb
devise_jwt_auth-0.1.0 test/controllers/custom/custom_confirmations_controller_test.rb
devise-tokens-1.0.4 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-1.1.3 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-1.1.2 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-1.1.1 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-1.1.0 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth_fork_dfabarbosa-1.0.0 test/controllers/custom/custom_confirmations_controller_test.rb