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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e90f2c94
Commit
e90f2c94
authored
Jul 05, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix expectation to be update
parent
ccf54188
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ee/spec/controllers/admin/push_rules_controller_spec.rb
ee/spec/controllers/admin/push_rules_controller_spec.rb
+1
-1
ee/spec/services/projects/update_service_spec.rb
ee/spec/services/projects/update_service_spec.rb
+3
-3
No files found.
ee/spec/controllers/admin/push_rules_controller_spec.rb
View file @
e90f2c94
...
...
@@ -17,7 +17,7 @@ describe Admin::PushRulesController do
end
it
'updates sample push rule'
do
expect_any_instance_of
(
PushRule
).
to
receive
(
:update
_attributes
).
with
(
ActionController
::
Parameters
.
new
(
params
).
permit!
)
expect_any_instance_of
(
PushRule
).
to
receive
(
:update
).
with
(
ActionController
::
Parameters
.
new
(
params
).
permit!
)
patch
:update
,
push_rule:
params
...
...
ee/spec/services/projects/update_service_spec.rb
View file @
e90f2c94
...
...
@@ -70,7 +70,7 @@ describe Projects::UpdateService, '#execute' do
let!
(
:old_name
)
{
project
.
full_name
}
let
(
:operation
)
{
update_project
(
project
,
user
,
name:
'foobar'
)
}
let
(
:fail_condition!
)
do
allow_any_instance_of
(
Project
).
to
receive
(
:update
_attributes
).
and_return
(
false
)
allow_any_instance_of
(
Project
).
to
receive
(
:update
).
and_return
(
false
)
end
let
(
:attributes
)
do
...
...
@@ -89,7 +89,7 @@ describe Projects::UpdateService, '#execute' do
include_examples
'audit event logging'
do
let
(
:operation
)
{
update_project
(
project
,
user
,
path:
'foobar1'
)
}
let
(
:fail_condition!
)
do
allow_any_instance_of
(
Project
).
to
receive
(
:update
_attributes
).
and_return
(
false
)
allow_any_instance_of
(
Project
).
to
receive
(
:update
).
and_return
(
false
)
end
let
(
:attributes
)
do
...
...
@@ -110,7 +110,7 @@ describe Projects::UpdateService, '#execute' do
update_project
(
project
,
user
,
visibility_level:
Gitlab
::
VisibilityLevel
::
INTERNAL
)
end
let
(
:fail_condition!
)
do
allow_any_instance_of
(
Project
).
to
receive
(
:update
_attributes
).
and_return
(
false
)
allow_any_instance_of
(
Project
).
to
receive
(
:update
).
and_return
(
false
)
end
let
(
:attributes
)
do
...
...
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