Commit 58601ebdab0cfa90e823418ccd587a0a503a985f
1 parent
7ed15bbc
Exists in
master
and in
4 other branches
Fix tests after user password length was changed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
4 changed files
with
10 additions
and
10 deletions
Show diff stats
features/steps/profile/profile.rb
... | ... | @@ -33,24 +33,24 @@ class Profile < Spinach::FeatureSteps |
33 | 33 | |
34 | 34 | step 'I try change my password w/o old one' do |
35 | 35 | within '.update-password' do |
36 | - fill_in "user_password", with: "222333" | |
37 | - fill_in "user_password_confirmation", with: "222333" | |
36 | + fill_in "user_password", with: "22233344" | |
37 | + fill_in "user_password_confirmation", with: "22233344" | |
38 | 38 | click_button "Save" |
39 | 39 | end |
40 | 40 | end |
41 | 41 | |
42 | 42 | step 'I change my password' do |
43 | 43 | within '.update-password' do |
44 | - fill_in "user_current_password", with: "123456" | |
45 | - fill_in "user_password", with: "222333" | |
46 | - fill_in "user_password_confirmation", with: "222333" | |
44 | + fill_in "user_current_password", with: "12345678" | |
45 | + fill_in "user_password", with: "22233344" | |
46 | + fill_in "user_password_confirmation", with: "22233344" | |
47 | 47 | click_button "Save" |
48 | 48 | end |
49 | 49 | end |
50 | 50 | |
51 | 51 | step 'I unsuccessfully change my password' do |
52 | 52 | within '.update-password' do |
53 | - fill_in "user_current_password", with: "123456" | |
53 | + fill_in "user_current_password", with: "12345678" | |
54 | 54 | fill_in "user_password", with: "password" |
55 | 55 | fill_in "user_password_confirmation", with: "confirmation" |
56 | 56 | click_button "Save" | ... | ... |
spec/factories.rb
... | ... | @@ -15,7 +15,7 @@ FactoryGirl.define do |
15 | 15 | email { Faker::Internet.email } |
16 | 16 | name |
17 | 17 | sequence(:username) { |n| "#{Faker::Internet.user_name}#{n}" } |
18 | - password "123456" | |
18 | + password "12345678" | |
19 | 19 | password_confirmation { password } |
20 | 20 | confirmed_at { Time.now } |
21 | 21 | confirmation_token { nil } | ... | ... |
spec/models/user_spec.rb
... | ... | @@ -90,8 +90,8 @@ describe User do |
90 | 90 | end |
91 | 91 | |
92 | 92 | it "should not generate password by default" do |
93 | - user = create(:user, password: 'abcdefg') | |
94 | - user.password.should == 'abcdefg' | |
93 | + user = create(:user, password: 'abcdefghe') | |
94 | + user.password.should == 'abcdefghe' | |
95 | 95 | end |
96 | 96 | |
97 | 97 | it "should generate password when forcing random password" do | ... | ... |
spec/support/login_helpers.rb
... | ... | @@ -16,7 +16,7 @@ module LoginHelpers |
16 | 16 | def login_with(user) |
17 | 17 | visit new_user_session_path |
18 | 18 | fill_in "user_login", with: user.email |
19 | - fill_in "user_password", with: "123456" | |
19 | + fill_in "user_password", with: "12345678" | |
20 | 20 | click_button "Sign in" |
21 | 21 | Thread.current[:current_user] = user |
22 | 22 | end | ... | ... |