This repository has been archived by the owner on Jul 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Parameter transformations use string keys
Because of how ActionController::Params#to_h works the keys will be strings instead of symbols. For this reason we must setup our transformations to use strings in order for them to be applied.
- Loading branch information
1 parent
fc08ec6
commit 7fd2528
Showing
8 changed files
with
50 additions
and
13 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module Monban | ||
# 1.0.0 | ||
VERSION = "1.0.0" | ||
# 1.0.1 | ||
VERSION = "1.0.1" | ||
end |
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'spec_helper' | ||
|
||
feature 'User signs in' do | ||
scenario 'with mismatched email case' do | ||
user = User.create!(email: "[email protected]", password_digest: "password") | ||
|
||
visit sign_in_path | ||
fill_in "session[email]", with: "[email protected]" | ||
fill_in "session[password]", with: "password" | ||
click_button "go" | ||
|
||
expect(current_path).to eq posts_path | ||
end | ||
end |
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 |
---|---|---|
|
@@ -10,6 +10,15 @@ | |
expect(page.current_path).to eq(posts_path) | ||
end | ||
|
||
scenario 'with uppercase email' do | ||
visit sign_up_path | ||
fill_in 'user_email', with: '[email protected]' | ||
fill_in 'user_password', with: 'password' | ||
click_on 'go' | ||
|
||
expect(User.last.email).to eq('[email protected]') | ||
end | ||
|
||
scenario 'multiple users' do | ||
visit sign_up_path | ||
fill_in 'user_email', with: '[email protected]' | ||
|
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