Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
e50c0d5c
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e50c0d5c
编写于
10月 09, 2013
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix spinach profile tests
上级
ffec158d
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
17 addition
and
9 deletion
+17
-9
app/controllers/profiles/passwords_controller.rb
app/controllers/profiles/passwords_controller.rb
+2
-2
features/profile/profile.feature
features/profile/profile.feature
+5
-5
features/steps/profile/profile.rb
features/steps/profile/profile.rb
+5
-1
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+5
-1
未找到文件。
app/controllers/profiles/passwords_controller.rb
浏览文件 @
e50c0d5c
class
Profiles::PasswordsController
<
ApplicationController
layout
:determine_layout
skip_before_filter
:check_password_expiration
skip_before_filter
:check_password_expiration
,
only:
[
:new
,
:create
]
before_filter
:set_user
before_filter
:set_title
...
...
@@ -44,7 +44,7 @@ class Profiles::PasswordsController < ApplicationController
flash
[
:notice
]
=
"Password was successfully updated. Please login with it"
redirect_to
new_user_session_path
else
render
'
accoun
t'
render
'
edi
t'
end
end
...
...
features/profile/profile.feature
浏览文件 @
e50c0d5c
...
...
@@ -12,13 +12,13 @@ Feature: Profile
And
I should see new contact info
Scenario
:
I
change my password without old one
Given
I visit profile
account
page
Given
I visit profile
password
page
When
I try change my password w/o old one
Then
I should see a missing password error message
And
I should be redirected to
account
page
And
I should be redirected to
password
page
Scenario
:
I
change my password
Given
I visit profile
account
page
Given
I visit profile
password
page
Then
I change my password
And
I should be redirected to sign in page
...
...
@@ -30,13 +30,13 @@ Feature: Profile
Scenario
:
My password is expired
Given
my password is expired
And
I am not an ldap user
And
I visit profile account
page
Given
I visit profile password
page
Then
I redirected to expired password page
And
I submit new password
And
I redirected to sign in page
Scenario
:
I
unsuccessfully change my password
Given
I visit profile
account
page
Given
I visit profile
password
page
When
I unsuccessfully change my password
Then
I should see a password error message
...
...
features/steps/profile/profile.rb
浏览文件 @
e50c0d5c
...
...
@@ -133,8 +133,12 @@ class Profile < Spinach::FeatureSteps
current_path
.
should
==
new_user_session_path
end
step
'I should be redirected to password page'
do
current_path
.
should
==
edit_profile_password_path
end
step
'I should be redirected to account page'
do
current_path
.
should
==
account_profile
_path
current_path
.
should
==
profile_account
_path
end
step
'I click on my profile picture'
do
...
...
features/steps/shared/paths.rb
浏览文件 @
e50c0d5c
...
...
@@ -65,8 +65,12 @@ module SharedPaths
visit
profile_path
end
step
'I visit profile password page'
do
visit
edit_profile_password_path
end
step
'I visit profile account page'
do
visit
account_profile
_path
visit
profile_account
_path
end
step
'I visit profile SSH keys page'
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录