Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
projects.thm.de
GitLab
Commits
519275c1
Commit
519275c1
authored
Jul 25, 2016
by
tiagonbotelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes part1 of files to start using active tense
parent
551ffc0a
Changes
75
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
322 additions
and
321 deletions
+322
-321
spec/controllers/admin/users_controller_spec.rb
spec/controllers/admin/users_controller_spec.rb
+1
-1
spec/controllers/application_controller_spec.rb
spec/controllers/application_controller_spec.rb
+3
-3
spec/controllers/groups/avatars_controller_spec.rb
spec/controllers/groups/avatars_controller_spec.rb
+1
-1
spec/controllers/groups/milestones_controller_spec.rb
spec/controllers/groups/milestones_controller_spec.rb
+1
-1
spec/controllers/profiles/avatars_controller_spec.rb
spec/controllers/profiles/avatars_controller_spec.rb
+1
-1
spec/controllers/profiles/keys_controller_spec.rb
spec/controllers/profiles/keys_controller_spec.rb
+9
-9
spec/controllers/projects/avatars_controller_spec.rb
spec/controllers/projects/avatars_controller_spec.rb
+1
-1
spec/controllers/projects/commit_controller_spec.rb
spec/controllers/projects/commit_controller_spec.rb
+13
-13
spec/controllers/projects/commits_controller_spec.rb
spec/controllers/projects/commits_controller_spec.rb
+1
-1
spec/controllers/projects/compare_controller_spec.rb
spec/controllers/projects/compare_controller_spec.rb
+4
-4
spec/controllers/projects/forks_controller_spec.rb
spec/controllers/projects/forks_controller_spec.rb
+5
-5
spec/controllers/projects/issues_controller_spec.rb
spec/controllers/projects/issues_controller_spec.rb
+8
-8
spec/controllers/projects/merge_requests_controller_spec.rb
spec/controllers/projects/merge_requests_controller_spec.rb
+6
-6
spec/controllers/projects/milestones_controller_spec.rb
spec/controllers/projects/milestones_controller_spec.rb
+1
-1
spec/controllers/projects/project_members_controller_spec.rb
spec/controllers/projects/project_members_controller_spec.rb
+1
-1
spec/controllers/projects/protected_branches_controller_spec.rb
...ontrollers/projects/protected_branches_controller_spec.rb
+1
-1
spec/controllers/projects/raw_controller_spec.rb
spec/controllers/projects/raw_controller_spec.rb
+1
-1
spec/controllers/projects/services_controller_spec.rb
spec/controllers/projects/services_controller_spec.rb
+2
-2
spec/controllers/projects_controller_spec.rb
spec/controllers/projects_controller_spec.rb
+5
-5
spec/features/admin/admin_abuse_reports_spec.rb
spec/features/admin/admin_abuse_reports_spec.rb
+2
-2
spec/features/admin/admin_hooks_spec.rb
spec/features/admin/admin_hooks_spec.rb
+3
-3
spec/features/admin/admin_projects_spec.rb
spec/features/admin/admin_projects_spec.rb
+3
-3
spec/features/admin/admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+14
-14
spec/features/atom/dashboard_spec.rb
spec/features/atom/dashboard_spec.rb
+3
-3
spec/features/atom/issues_spec.rb
spec/features/atom/issues_spec.rb
+2
-2
spec/features/atom/users_spec.rb
spec/features/atom/users_spec.rb
+6
-6
spec/features/ci_lint_spec.rb
spec/features/ci_lint_spec.rb
+1
-1
spec/features/commits_spec.rb
spec/features/commits_spec.rb
+1
-1
spec/features/compare_spec.rb
spec/features/compare_spec.rb
+3
-3
spec/features/dashboard/label_filter_spec.rb
spec/features/dashboard/label_filter_spec.rb
+1
-1
spec/features/dashboard_issues_spec.rb
spec/features/dashboard_issues_spec.rb
+3
-3
spec/features/gitlab_flavored_markdown_spec.rb
spec/features/gitlab_flavored_markdown_spec.rb
+12
-12
spec/features/help_pages_spec.rb
spec/features/help_pages_spec.rb
+1
-1
spec/features/issues/award_emoji_spec.rb
spec/features/issues/award_emoji_spec.rb
+5
-5
spec/features/issues/award_spec.rb
spec/features/issues/award_spec.rb
+4
-4
spec/features/issues/bulk_assignment_labels_spec.rb
spec/features/issues/bulk_assignment_labels_spec.rb
+4
-4
spec/features/issues/filter_by_labels_spec.rb
spec/features/issues/filter_by_labels_spec.rb
+23
-23
spec/features/issues/filter_by_milestone_spec.rb
spec/features/issues/filter_by_milestone_spec.rb
+3
-3
spec/features/issues/filter_issues_spec.rb
spec/features/issues/filter_issues_spec.rb
+19
-19
spec/features/issues/issue_sidebar_spec.rb
spec/features/issues/issue_sidebar_spec.rb
+4
-4
spec/features/issues/new_branch_button_spec.rb
spec/features/issues/new_branch_button_spec.rb
+1
-1
spec/features/issues/todo_spec.rb
spec/features/issues/todo_spec.rb
+2
-2
spec/features/issues/update_issues_spec.rb
spec/features/issues/update_issues_spec.rb
+6
-6
spec/features/issues_spec.rb
spec/features/issues_spec.rb
+8
-8
spec/features/login_spec.rb
spec/features/login_spec.rb
+1
-1
spec/features/merge_requests/award_spec.rb
spec/features/merge_requests/award_spec.rb
+4
-4
spec/features/merge_requests/edit_mr_spec.rb
spec/features/merge_requests/edit_mr_spec.rb
+1
-1
spec/features/merge_requests/filter_by_milestone_spec.rb
spec/features/merge_requests/filter_by_milestone_spec.rb
+3
-3
spec/features/merge_requests/merge_when_build_succeeds_spec.rb
...features/merge_requests/merge_when_build_succeeds_spec.rb
+1
-1
spec/features/milestone_spec.rb
spec/features/milestone_spec.rb
+2
-2
spec/features/notes_on_merge_requests_spec.rb
spec/features/notes_on_merge_requests_spec.rb
+6
-6
spec/features/participants_autocomplete_spec.rb
spec/features/participants_autocomplete_spec.rb
+3
-3
spec/features/pipelines_spec.rb
spec/features/pipelines_spec.rb
+5
-5
spec/features/profile_spec.rb
spec/features/profile_spec.rb
+2
-2
spec/features/projects/labels/update_prioritization_spec.rb
spec/features/projects/labels/update_prioritization_spec.rb
+2
-2
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+4
-4
spec/features/search_spec.rb
spec/features/search_spec.rb
+9
-9
spec/features/todos/todos_spec.rb
spec/features/todos/todos_spec.rb
+1
-1
spec/features/variables_spec.rb
spec/features/variables_spec.rb
+4
-4
spec/finders/merge_requests_finder_spec.rb
spec/finders/merge_requests_finder_spec.rb
+2
-2
spec/finders/notes_finder_spec.rb
spec/finders/notes_finder_spec.rb
+2
-2
spec/helpers/application_helper_spec.rb
spec/helpers/application_helper_spec.rb
+10
-10
spec/helpers/blob_helper_spec.rb
spec/helpers/blob_helper_spec.rb
+5
-5
spec/helpers/diff_helper_spec.rb
spec/helpers/diff_helper_spec.rb
+5
-5
spec/helpers/emails_helper_spec.rb
spec/helpers/emails_helper_spec.rb
+6
-6
spec/helpers/events_helper_spec.rb
spec/helpers/events_helper_spec.rb
+7
-7
spec/helpers/gitlab_markdown_helper_spec.rb
spec/helpers/gitlab_markdown_helper_spec.rb
+10
-10
spec/helpers/graph_helper_spec.rb
spec/helpers/graph_helper_spec.rb
+1
-1
spec/helpers/groups_helper_spec.rb
spec/helpers/groups_helper_spec.rb
+2
-2
spec/helpers/issues_helper_spec.rb
spec/helpers/issues_helper_spec.rb
+5
-4
spec/helpers/notes_helper_spec.rb
spec/helpers/notes_helper_spec.rb
+1
-1
spec/helpers/search_helper_spec.rb
spec/helpers/search_helper_spec.rb
+1
-1
spec/helpers/submodule_helper_spec.rb
spec/helpers/submodule_helper_spec.rb
+14
-14
spec/helpers/tree_helper_spec.rb
spec/helpers/tree_helper_spec.rb
+2
-2
spec/lib/ci/charts_spec.rb
spec/lib/ci/charts_spec.rb
+2
-2
No files found.
spec/controllers/admin/users_controller_spec.rb
View file @
519275c1
...
...
@@ -39,7 +39,7 @@
user
.
ldap_block
end
it
'
will
not unblock user'
do
it
'
does
not unblock user'
do
put
:unblock
,
id:
user
.
username
user
.
reload
expect
(
user
.
blocked?
).
to
be_truthy
...
...
spec/controllers/application_controller_spec.rb
View file @
519275c1
...
...
@@ -5,7 +5,7 @@
let
(
:user
)
{
create
(
:user
)
}
let
(
:controller
)
{
ApplicationController
.
new
}
it
'
should
redirect if the user is over their password expiry'
do
it
'redirect
s
if the user is over their password expiry'
do
user
.
password_expires_at
=
Time
.
new
(
2002
)
expect
(
user
.
ldap_user?
).
to
be_falsey
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
...
...
@@ -14,7 +14,7 @@
controller
.
send
(
:check_password_expiration
)
end
it
'
should
not redirect if the user is under their password expiry'
do
it
'
does
not redirect if the user is under their password expiry'
do
user
.
password_expires_at
=
Time
.
now
+
20010101
expect
(
user
.
ldap_user?
).
to
be_falsey
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
...
...
@@ -22,7 +22,7 @@
controller
.
send
(
:check_password_expiration
)
end
it
'
should
not redirect if the user is over their password expiry but they are an ldap user'
do
it
'
does
not redirect if the user is over their password expiry but they are an ldap user'
do
user
.
password_expires_at
=
Time
.
new
(
2002
)
allow
(
user
).
to
receive
(
:ldap_user?
).
and_return
(
true
)
allow
(
controller
).
to
receive
(
:current_user
).
and_return
(
user
)
...
...
spec/controllers/groups/avatars_controller_spec.rb
View file @
519275c1
...
...
@@ -9,7 +9,7 @@
sign_in
(
user
)
end
it
'
destroy should
remove avatar from DB'
do
it
'remove
s
avatar from DB
calling destroy
'
do
delete
:destroy
,
group_id:
group
.
path
@group
=
assigns
(
:group
)
expect
(
@group
.
avatar
.
present?
).
to
be_falsey
...
...
spec/controllers/groups/milestones_controller_spec.rb
View file @
519275c1
...
...
@@ -15,7 +15,7 @@
end
describe
"#create"
do
it
"
should
create group milestone with Chinese title"
do
it
"create
s
group milestone with Chinese title"
do
post
:create
,
group_id:
group
.
id
,
milestone:
{
project_ids:
[
project
.
id
,
project2
.
id
],
title:
title
}
...
...
spec/controllers/profiles/avatars_controller_spec.rb
View file @
519275c1
...
...
@@ -8,7 +8,7 @@
controller
.
instance_variable_set
(
:@user
,
user
)
end
it
'
destroy should
remove avatar from DB'
do
it
'remove
s
avatar from DB
by calling destroy
'
do
delete
:destroy
@user
=
assigns
(
:user
)
expect
(
@user
.
avatar
.
present?
).
to
be_falsey
...
...
spec/controllers/profiles/keys_controller_spec.rb
View file @
519275c1
...
...
@@ -6,7 +6,7 @@
describe
'#new'
do
before
{
sign_in
(
user
)
}
it
'redirect to #index'
do
it
'redirect
s
to #index'
do
get
:new
expect
(
response
).
to
redirect_to
(
profile_keys_path
)
...
...
@@ -15,7 +15,7 @@
describe
"#get_keys"
do
describe
"non existant user"
do
it
"
should
generally
not
work"
do
it
"
does not
generally work"
do
get
:get_keys
,
username:
'not-existent'
expect
(
response
).
not_to
be_success
...
...
@@ -23,19 +23,19 @@
end
describe
"user with no keys"
do
it
"
should
generally work"
do
it
"
does
generally work"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
).
to
be_success
end
it
"
should
render all keys separated with a new line"
do
it
"render
s
all keys separated with a new line"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
.
body
).
to
eq
(
""
)
end
it
"
should
respond with text/plain content type"
do
it
"respond
s
with text/plain content type"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
.
content_type
).
to
eq
(
"text/plain"
)
end
...
...
@@ -47,13 +47,13 @@
user
.
keys
<<
create
(
:another_key
)
end
it
"
should
generally work"
do
it
"
does
generally work"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
).
to
be_success
end
it
"
should
render all keys separated with a new line"
do
it
"render
s
all keys separated with a new line"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
.
body
).
not_to
eq
(
""
)
...
...
@@ -65,13 +65,13 @@
expect
(
response
.
body
).
to
match
(
/AQDmTillFzNTrrGgwaCKaSj/
)
end
it
"
should
not render the comment of the key"
do
it
"
does
not render the comment of the key"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
.
body
).
not_to
match
(
/dummy@gitlab.com/
)
end
it
"
should
respond with text/plain content type"
do
it
"respond
s
with text/plain content type"
do
get
:get_keys
,
username:
user
.
username
expect
(
response
.
content_type
).
to
eq
(
"text/plain"
)
end
...
...
spec/controllers/projects/avatars_controller_spec.rb
View file @
519275c1
...
...
@@ -10,7 +10,7 @@
controller
.
instance_variable_set
(
:@project
,
project
)
end
it
'
destroy should
remove avatar from DB'
do
it
'remove
s
avatar from DB
by calling destroy
'
do
delete
:destroy
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
expect
(
project
.
avatar
.
present?
).
to
be_falsey
expect
(
project
).
to
be_valid
...
...
spec/controllers/projects/commit_controller_spec.rb
View file @
519275c1
...
...
@@ -47,25 +47,25 @@ def go(extra_params = {})
end
shared_examples
"export as"
do
|
format
|
it
"
should
generally work"
do
it
"
does
generally work"
do
go
(
id:
commit
.
id
,
format:
format
)
expect
(
response
).
to
be_success
end
it
"
should
generate it"
do
it
"generate
s
it"
do
expect_any_instance_of
(
Commit
).
to
receive
(
:"to_
#{
format
}
"
)
go
(
id:
commit
.
id
,
format:
format
)
end
it
"
should
render it"
do
it
"render
s
it"
do
go
(
id:
commit
.
id
,
format:
format
)
expect
(
response
.
body
).
to
eq
(
commit
.
send
(
:"to_
#{
format
}
"
))
end
it
"
should
not escape Html"
do
it
"
does
not escape Html"
do
allow_any_instance_of
(
Commit
).
to
receive
(
:"to_
#{
format
}
"
).
and_return
(
'HTML entities &<>" '
)
...
...
@@ -88,7 +88,7 @@ def go(extra_params = {})
expect
(
response
.
body
).
to
start_with
(
"diff --git"
)
end
it
"s
hould really
only be a git diff without whitespace changes"
do
it
"
i
s only be a git diff without whitespace changes"
do
go
(
id:
'66eceea0db202bb39c4e445e8ca28689645366c5'
,
format:
format
,
w:
1
)
expect
(
response
.
body
).
to
start_with
(
"diff --git"
)
...
...
@@ -103,13 +103,13 @@ def go(extra_params = {})
include_examples
"export as"
,
:patch
let
(
:format
)
{
:patch
}
it
"s
hould really be
a git email patch"
do
it
"
i
s a git email patch"
do
go
(
id:
commit
.
id
,
format:
format
)
expect
(
response
.
body
).
to
start_with
(
"From
#{
commit
.
id
}
"
)
end
it
"
should
contain a git diff"
do
it
"contain
s
a git diff"
do
go
(
id:
commit
.
id
,
format:
format
)
expect
(
response
.
body
).
to
match
(
/^diff --git/
)
...
...
@@ -147,7 +147,7 @@ def go(extra_params = {})
describe
'POST revert'
do
context
'when target branch is not provided'
do
it
'
should
render the 404 page'
do
it
'render
s
the 404 page'
do
post
(
:revert
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -159,7 +159,7 @@ def go(extra_params = {})
end
context
'when the revert was successful'
do
it
'
should
redirect to the commits page'
do
it
'redirect
s
to the commits page'
do
post
(
:revert
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -180,7 +180,7 @@ def go(extra_params = {})
id:
commit
.
id
)
end
it
'
should
redirect to the commit page'
do
it
'redirect
s
to the commit page'
do
# Reverting a commit that has been already reverted.
post
(
:revert
,
namespace_id:
project
.
namespace
.
to_param
,
...
...
@@ -196,7 +196,7 @@ def go(extra_params = {})
describe
'POST cherry_pick'
do
context
'when target branch is not provided'
do
it
'
should
render the 404 page'
do
it
'render
s
the 404 page'
do
post
(
:cherry_pick
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -208,7 +208,7 @@ def go(extra_params = {})
end
context
'when the cherry-pick was successful'
do
it
'
should
redirect to the commits page'
do
it
'redirect
s
to the commits page'
do
post
(
:cherry_pick
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -229,7 +229,7 @@ def go(extra_params = {})
id:
master_pickable_commit
.
id
)
end
it
'
should
redirect to the commit page'
do
it
'redirect
s
to the commit page'
do
# Cherry-picking a commit that has been already cherry-picked.
post
(
:cherry_pick
,
namespace_id:
project
.
namespace
.
to_param
,
...
...
spec/controllers/projects/commits_controller_spec.rb
View file @
519275c1
...
...
@@ -11,7 +11,7 @@
describe
"GET show"
do
context
"as atom feed"
do
it
"
should
render as atom"
do
it
"render
s
as atom"
do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
spec/controllers/projects/compare_controller_spec.rb
View file @
519275c1
...
...
@@ -11,7 +11,7 @@
project
.
team
<<
[
user
,
:master
]
end
it
'compare sho
uld sho
w some diffs'
do
it
'compare show
s
some diffs'
do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -23,7 +23,7 @@
expect
(
assigns
(
:commits
).
length
).
to
be
>=
1
end
it
'compare sho
uld sho
w some diffs with ignore whitespace change option'
do
it
'compare show
s
some diffs with ignore whitespace change option'
do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -41,7 +41,7 @@
end
describe
'non-existent refs'
do
it
'invalid source ref'
do
it
'
uses
invalid source ref'
do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -53,7 +53,7 @@
expect
(
assigns
(
:commits
)).
to
eq
([])
end
it
'invalid target ref'
do
it
'
uses
invalid target ref'
do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
spec/controllers/projects/forks_controller_spec.rb
View file @
519275c1
...
...
@@ -16,7 +16,7 @@ def get_forks
context
'when fork is public'
do
before
{
forked_project
.
update_attribute
(
:visibility_level
,
Project
::
PUBLIC
)
}
it
's
hould be
visible for non logged in users'
do
it
'
i
s visible for non logged in users'
do
get_forks
expect
(
assigns
[
:forks
]).
to
be_present
...
...
@@ -28,7 +28,7 @@ def get_forks
forked_project
.
update_attributes
(
visibility_level:
Project
::
PRIVATE
,
group:
group
)
end
it
's
hould
not be visible for non logged in users'
do
it
'
i
s not be visible for non logged in users'
do
get_forks
expect
(
assigns
[
:forks
]).
to
be_blank
...
...
@@ -38,7 +38,7 @@ def get_forks
before
{
sign_in
(
project
.
creator
)
}
context
'when user is not a Project member neither a group member'
do
it
'
should
not see the Project listed'
do
it
'
does
not see the Project listed'
do
get_forks
expect
(
assigns
[
:forks
]).
to
be_blank
...
...
@@ -48,7 +48,7 @@ def get_forks
context
'when user is a member of the Project'
do
before
{
forked_project
.
team
<<
[
project
.
creator
,
:developer
]
}
it
'
should
see the project listed'
do
it
'see
s
the project listed'
do
get_forks
expect
(
assigns
[
:forks
]).
to
be_present
...
...
@@ -58,7 +58,7 @@ def get_forks
context
'when user is a member of the Group'
do
before
{
forked_project
.
group
.
add_developer
(
project
.
creator
)
}
it
'
should
see the project listed'
do
it
'see
s
the project listed'
do
get_forks
expect
(
assigns
[
:forks
]).
to
be_present
...
...
spec/controllers/projects/issues_controller_spec.rb
View file @
519275c1
...
...
@@ -30,7 +30,7 @@
expect
(
response
).
to
have_http_status
(
200
)
end
it
"return 301 if request path doesn't match project path"
do
it
"return
s
301 if request path doesn't match project path"
do
get
:index
,
namespace_id:
project
.
namespace
.
path
,
project_id:
project
.
path
.
upcase
expect
(
response
).
to
redirect_to
(
namespace_project_issues_path
(
project
.
namespace
,
project
))
...
...
@@ -119,21 +119,21 @@ def move_issue
let!
(
:request_forgery_timing_attack
)
{
create
(
:issue
,
:confidential
,
project:
project
,
assignee:
assignee
)
}
describe
'GET #index'
do
it
'
should
not list confidential issues for guests'
do
it
'
does
not list confidential issues for guests'
do
sign_out
(
:user
)
get_issues
expect
(
assigns
(
:issues
)).
to
eq
[
issue
]
end
it
'
should
not list confidential issues for non project members'
do
it
'
does
not list confidential issues for non project members'
do
sign_in
(
non_member
)
get_issues
expect
(
assigns
(
:issues
)).
to
eq
[
issue
]
end
it
'
should
not list confidential issues for project members with guest role'
do
it
'
does
not list confidential issues for project members with guest role'
do
sign_in
(
member
)
project
.
team
<<
[
member
,
:guest
]
...
...
@@ -142,7 +142,7 @@ def move_issue
expect
(
assigns
(
:issues
)).
to
eq
[
issue
]
end
it
'
should
list confidential issues for author'
do
it
'list
s
confidential issues for author'
do
sign_in
(
author
)
get_issues
...
...
@@ -150,7 +150,7 @@ def move_issue
expect
(
assigns
(
:issues
)).
not_to
include
request_forgery_timing_attack
end
it
'
should
list confidential issues for assignee'
do
it
'list
s
confidential issues for assignee'
do
sign_in
(
assignee
)
get_issues
...
...
@@ -158,7 +158,7 @@ def move_issue
expect
(
assigns
(
:issues
)).
to
include
request_forgery_timing_attack
end
it
'
should
list confidential issues for project members'
do
it
'list
s
confidential issues for project members'
do
sign_in
(
member
)
project
.
team
<<
[
member
,
:developer
]
...
...
@@ -168,7 +168,7 @@ def move_issue
expect
(
assigns
(
:issues
)).
to
include
request_forgery_timing_attack
end
it
'
should
list confidential issues for admin'
do
it
'list
s
confidential issues for admin'
do
sign_in
(
admin
)
get_issues
...
...
spec/controllers/projects/merge_requests_controller_spec.rb
View file @
519275c1
...
...
@@ -36,7 +36,7 @@
describe
"GET show"
do
shared_examples
"export merge as"
do
|
format
|
it
"
should
generally work"
do
it
"
does
generally work"
do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -46,7 +46,7 @@
expect
(
response
).
to
be_success
end
it
"
should
generate it"
do
it
"generate
s
it"
do
expect_any_instance_of
(
MergeRequest
).
to
receive
(
:"to_
#{
format
}
"
)
get
(
:show
,
...
...
@@ -56,7 +56,7 @@
format:
format
)
end
it
"
should
render it"
do
it
"render
s
it"
do
get
(
:show
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
,
...
...
@@ -66,7 +66,7 @@
expect
(
response
.
body
).
to
eq
(
merge_request
.
send
(
:"to_
#{
format
}
"
).
to_s
)
end
it
"
should
not escape Html"
do
it
"
does
not escape Html"
do
allow_any_instance_of
(
MergeRequest
).
to
receive
(
:"to_
#{
format
}
"
).
and_return
(
'HTML entities &<>" '
)
...
...
@@ -118,7 +118,7 @@ def get_merge_requests
context
'when filtering by opened state'
do
context
'with opened merge requests'
do
it
'
should
list those merge requests'
do
it
'list
s
those merge requests'
do
get_merge_requests
expect
(
assigns
(
:merge_requests
)).
to
include
(
merge_request
)
...
...
@@ -131,7 +131,7 @@ def get_merge_requests
merge_request
.
reopen!
end
it
'
should
list those merge requests'
do
it
'list
s
those merge requests'
do
get_merge_requests
expect
(
assigns
(
:merge_requests
)).
to
include
(
merge_request
)
...
...
spec/controllers/projects/milestones_controller_spec.rb
View file @
519275c1
...
...
@@ -14,7 +14,7 @@
end
describe
"#destroy"
do
it
"
should
remove milestone"
do
it
"remove
s
milestone"
do
expect
(
issue
.
milestone_id
).
to
eq
(
milestone
.
id
)
delete
:destroy
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
milestone
.
iid
,
format: :js
...
...
spec/controllers/projects/project_members_controller_spec.rb
View file @
519275c1
...
...
@@ -167,7 +167,7 @@
sign_in
(
user
)
end
it
'
can
not remove himself from the project'
do
it
'
does
not remove himself from the project'
do
delete
:leave
,
namespace_id:
project
.
namespace
,
project_id:
project
...
...
spec/controllers/projects/protected_branches_controller_spec.rb
View file @
519275c1
...
...
@@ -3,7 +3,7 @@
describe
Projects
::
ProtectedBranchesController
do
describe
"GET #index"
do
let
(
:project
)
{
create
(
:project_empty_repo
,
:public
)
}
it
"redirect empty repo to projects page"
do
it
"redirect
s
empty repo to projects page"
do
get
(
:index
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
.
to_param
)
end
end
...
...
spec/controllers/projects/raw_controller_spec.rb
View file @
519275c1
...
...
@@ -24,7 +24,7 @@
context
'image header'
do
let
(
:id
)
{
'master/files/images/6049019_460s.jpg'
}
it
'set image content type header'
do
it
'set
s
image content type header'
do
get
(
:show
,
namespace_id:
public_project
.
namespace
.
to_param
,
project_id:
public_project
.
to_param
,
...
...
spec/controllers/projects/services_controller_spec.rb
View file @
519275c1
...
...
@@ -19,7 +19,7 @@
describe
"#test"
do
context
'success'
do
it
"
should
redirect and show success message"
do
it
"redirect
s
and show success message"
do
expect
(
service
).
to
receive
(
:test
).
and_return
({
success:
true
,
result:
'done'
})
get
:test
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
service
.
id
,
format: :html
expect
(
response
.
status
).
to
redirect_to
(
'/'
)
...
...
@@ -28,7 +28,7 @@
end
context
'failure'
do
it
"
should
redirect and show failure message"
do
it
"redirect
s
and show failure message"
do
expect
(
service
).
to
receive
(
:test
).
and_return
({
success:
false
,
result:
'Bad test'
})
get
:test
,
namespace_id:
project
.
namespace
.
id
,
project_id:
project
.
id
,
id:
service
.
id
,
format: :html
expect
(
response
.
status
).
to
redirect_to
(
'/'
)
...
...
spec/controllers/projects_controller_spec.rb
View file @
519275c1
...
...
@@ -128,7 +128,7 @@
context
"when the url contains .atom"
do
let
(
:public_project_with_dot_atom
)
{
build
(
:project
,
:public
,
name:
'my.atom'
,
path:
'my.atom'
)
}
it
'expect an error creating the project'
do
it
'expect
s
an error creating the project'
do
expect
(
public_project_with_dot_atom
).
not_to
be_valid
end
end
...
...
@@ -222,7 +222,7 @@
create
(
:forked_project_link
,
forked_to_project:
project_fork
)
end
it
'
should
remove fork from project'
do
it
'remove
s
fork from project'
do
delete
(
:remove_fork
,
namespace_id:
project_fork
.
namespace
.
to_param
,
id:
project_fork
.
to_param
,
format: :js
)
...
...
@@ -236,7 +236,7 @@
context
'when project not forked'
do
let
(
:unforked_project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
it
'
should
do nothing if project was not forked'
do
it
'do
es
nothing if project was not forked'
do
delete
(
:remove_fork
,
namespace_id:
unforked_project
.
namespace
.
to_param
,
id:
unforked_project
.
to_param
,
format: :js
)
...
...
@@ -256,7 +256,7 @@
end
describe
"GET refs"
do
it
"
should
get a list of branches and tags"
do
it
"get
s
a list of branches and tags"
do
get
:refs
,
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
parsed_body
=
JSON
.
parse
(
response
.
body
)
...
...
@@ -265,7 +265,7 @@
expect
(
parsed_body
[
"Commits"
]).
to
be_nil
end
it
"
should
get a list of branches, tags and commits"
do
it
"get
s
a list of branches, tags and commits"
do
get
:refs
,
namespace_id:
public_project
.
namespace
.
path
,
id:
public_project
.
path
,
ref:
"123456"
parsed_body
=
JSON
.
parse
(
response
.
body
)
...
...
spec/features/admin/admin_abuse_reports_spec.rb
View file @
519275c1
...
...
@@ -11,7 +11,7 @@
end
describe
'in the abuse report view'
do
it
"
should
present a link to the user's profile"
do
it
"present
s
a link to the user's profile"
do
visit
admin_abuse_reports_path
expect
(
page
).
to
have_link
user
.
name
,
href:
user_path
(
user
)
...
...
@@ -19,7 +19,7 @@
end
describe
'in the profile page of the user'
do
it
'sho
uld sho
w a link to the admin view of the user'
do
it
'show
s
a link to the admin view of the user'
do
visit
user_path
(
user
)
expect
(
page
).
to
have_link
''
,
href:
admin_user_path
(
user
)
...
...
spec/features/admin/admin_hooks_spec.rb
View file @
519275c1
...
...
@@ -9,7 +9,7 @@