Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
58601ebd
Commit
58601ebd
authored
11 years ago
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests after user password length was changed
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
7ed15bbc
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
10 deletions
+10
-10
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+6
-6
spec/factories.rb
spec/factories.rb
+1
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+2
-2
spec/support/login_helpers.rb
spec/support/login_helpers.rb
+1
-1
No files found.
features/steps/profile/profile.rb
View file @
58601ebd
...
...
@@ -33,24 +33,24 @@ class Profile < Spinach::FeatureSteps
step
'I try change my password w/o old one'
do
within
'.update-password'
do
fill_in
"user_password"
,
with:
"222333"
fill_in
"user_password_confirmation"
,
with:
"222333"
fill_in
"user_password"
,
with:
"222333
44
"
fill_in
"user_password_confirmation"
,
with:
"222333
44
"
click_button
"Save"
end
end
step
'I change my password'
do
within
'.update-password'
do
fill_in
"user_current_password"
,
with:
"123456"
fill_in
"user_password"
,
with:
"222333"
fill_in
"user_password_confirmation"
,
with:
"222333"
fill_in
"user_current_password"
,
with:
"123456
78
"
fill_in
"user_password"
,
with:
"222333
44
"
fill_in
"user_password_confirmation"
,
with:
"222333
44
"
click_button
"Save"
end
end
step
'I unsuccessfully change my password'
do
within
'.update-password'
do
fill_in
"user_current_password"
,
with:
"123456"
fill_in
"user_current_password"
,
with:
"123456
78
"
fill_in
"user_password"
,
with:
"password"
fill_in
"user_password_confirmation"
,
with:
"confirmation"
click_button
"Save"
...
...
This diff is collapsed.
Click to expand it.
spec/factories.rb
View file @
58601ebd
...
...
@@ -15,7 +15,7 @@ FactoryGirl.define do
email
{
Faker
::
Internet
.
email
}
name
sequence
(
:username
)
{
|
n
|
"
#{
Faker
::
Internet
.
user_name
}#{
n
}
"
}
password
"123456"
password
"123456
78
"
password_confirmation
{
password
}
confirmed_at
{
Time
.
now
}
confirmation_token
{
nil
}
...
...
This diff is collapsed.
Click to expand it.
spec/models/user_spec.rb
View file @
58601ebd
...
...
@@ -90,8 +90,8 @@ describe User do
end
it
"should not generate password by default"
do
user
=
create
(
:user
,
password:
'abcdefg'
)
user
.
password
.
should
==
'abcdefg'
user
=
create
(
:user
,
password:
'abcdefg
he
'
)
user
.
password
.
should
==
'abcdefg
he
'
end
it
"should generate password when forcing random password"
do
...
...
This diff is collapsed.
Click to expand it.
spec/support/login_helpers.rb
View file @
58601ebd
...
...
@@ -16,7 +16,7 @@ module LoginHelpers
def
login_with
(
user
)
visit
new_user_session_path
fill_in
"user_login"
,
with:
user
.
email
fill_in
"user_password"
,
with:
"123456"
fill_in
"user_password"
,
with:
"123456
78
"
click_button
"Sign in"
Thread
.
current
[
:current_user
]
=
user
end
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment