-
-
Notifications
You must be signed in to change notification settings - Fork 934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prevent submission if password is not included #5250
Changes from 2 commits
063b4ae
e0d319e
b56b1d0
2c2f968
6341f05
74bf3e7
f79ad96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,6 +133,19 @@ def sign_out | |
assert page.has_link?("@nick1", href: "https://twitter.com/nick1") | ||
end | ||
|
||
test "adding X(formerly Twitter) username without filling in your password" do | ||
sign_in | ||
visit profile_path("nick1") | ||
|
||
click_link "Edit Profile" | ||
fill_in "user_twitter_username", with: "nick1twitter" | ||
click_button "Update" | ||
puts page.html | ||
|
||
|
||
assert_content("please fill in your password") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This may not be readable by capybara because it's browser generated. What if you click submit, comment about what's happening (browser halted submit because password is required), then filled the password and submitted again and check that the new value is saved. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! I had to write this as a system test rather than an integration test since the system test runs the test on actual chrome. |
||
end | ||
|
||
test "deleting profile" do | ||
sign_in | ||
visit profile_path("nick1") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to self: I need to write the test in the system folder
rubygems.org/test/system/multifactor_auths_test.rb
Line 147 in dd89efd