Sha256: c28643e0e696a9bda9bdec39f7d50b339a7616622b590d07fc297eb53516bbe6

Contents?: true

Size: 789 Bytes

Versions: 15

Compression:

Stored size: 789 Bytes

Contents

require 'test_helper'

class Custom::ConfirmationsControllerTest < ActionController::TestCase

  describe Custom::ConfirmationsController do

    before do
      @redirect_url = Faker::Internet.url
      @new_user = users(:unconfirmed_email_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, {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

15 entries across 15 versions & 1 rubygems

Version Path
devise_token_auth-0.1.42 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.41 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.40 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.39 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.38 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.37 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.37.beta4 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.37.beta3 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.37.beta2 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.37.beta1 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.36 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.35 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.34 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.33 test/controllers/custom/custom_confirmations_controller_test.rb
devise_token_auth-0.1.32 test/controllers/custom/custom_confirmations_controller_test.rb