forked from lynndylanhurley/devise_token_auth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests] update test suite for rails 5.1
notable changes: - added rails version to migrations - updated test requests to new format - updated several test runner dependencies - various rubocop linting fixes within test suite
- Loading branch information
1 parent
a8213a8
commit 1b1d32a
Showing
40 changed files
with
1,190 additions
and
1,168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 5 additions & 10 deletions
15
test/controllers/custom/custom_confirmations_controller_test.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
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 | ||
}) | ||
@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} | ||
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" | ||
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 |
Oops, something went wrong.