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
Léo-Paul Géneau
gitlab-ce
Commits
f1504e1a
Commit
f1504e1a
authored
Nov 30, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test fix
parent
e92ceb7b
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
25 additions
and
10 deletions
+25
-10
app/models/project_services/gitlab_ci_service.rb
app/models/project_services/gitlab_ci_service.rb
+1
-1
spec/features/admin/admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+4
-1
spec/services/issues/close_service_spec.rb
spec/services/issues/close_service_spec.rb
+3
-1
spec/services/issues/update_service_spec.rb
spec/services/issues/update_service_spec.rb
+4
-1
spec/services/merge_requests/close_service_spec.rb
spec/services/merge_requests/close_service_spec.rb
+3
-1
spec/services/merge_requests/merge_service_spec.rb
spec/services/merge_requests/merge_service_spec.rb
+3
-2
spec/services/merge_requests/reopen_service_spec.rb
spec/services/merge_requests/reopen_service_spec.rb
+3
-1
spec/services/merge_requests/update_service_spec.rb
spec/services/merge_requests/update_service_spec.rb
+4
-2
No files found.
app/models/project_services/gitlab_ci_service.rb
View file @
f1504e1a
...
@@ -55,7 +55,7 @@ class GitlabCiService < CiService
...
@@ -55,7 +55,7 @@ class GitlabCiService < CiService
end
end
def
get_ci_commit
(
sha
,
ref
)
def
get_ci_commit
(
sha
,
ref
)
Ci
::
Project
.
find
(
project
.
gitlab_ci_project
).
commits
.
find_by_sha!
(
sha
)
Ci
::
Project
.
find
(
project
.
gitlab_ci_project
.
id
).
commits
.
find_by_sha!
(
sha
)
end
end
def
commit_status
(
sha
,
ref
)
def
commit_status
(
sha
,
ref
)
...
...
spec/features/admin/admin_users_spec.rb
View file @
f1504e1a
...
@@ -93,7 +93,10 @@ describe "Admin::Users", feature: true do
...
@@ -93,7 +93,10 @@ describe "Admin::Users", feature: true do
end
end
it
"should send valid email to user with email & password"
do
it
"should send valid email to user with email & password"
do
perform_enqueued_jobs
do
click_button
"Create user"
click_button
"Create user"
end
user
=
User
.
find_by
(
username:
'bang'
)
user
=
User
.
find_by
(
username:
'bang'
)
email
=
ActionMailer
::
Base
.
deliveries
.
last
email
=
ActionMailer
::
Base
.
deliveries
.
last
expect
(
email
.
subject
).
to
have_content
(
'Account was created'
)
expect
(
email
.
subject
).
to
have_content
(
'Account was created'
)
...
...
spec/services/issues/close_service_spec.rb
View file @
f1504e1a
...
@@ -14,8 +14,10 @@ describe Issues::CloseService do
...
@@ -14,8 +14,10 @@ describe Issues::CloseService do
describe
:execute
do
describe
:execute
do
context
"valid params"
do
context
"valid params"
do
before
do
before
do
perform_enqueued_jobs
do
@issue
=
Issues
::
CloseService
.
new
(
project
,
user
,
{}).
execute
(
issue
)
@issue
=
Issues
::
CloseService
.
new
(
project
,
user
,
{}).
execute
(
issue
)
end
end
end
it
{
expect
(
@issue
).
to
be_valid
}
it
{
expect
(
@issue
).
to
be_valid
}
it
{
expect
(
@issue
).
to
be_closed
}
it
{
expect
(
@issue
).
to
be_closed
}
...
...
spec/services/issues/update_service_spec.rb
View file @
f1504e1a
...
@@ -36,7 +36,10 @@ describe Issues::UpdateService do
...
@@ -36,7 +36,10 @@ describe Issues::UpdateService do
label_ids:
[
label
.
id
]
label_ids:
[
label
.
id
]
}
}
perform_enqueued_jobs
do
@issue
=
Issues
::
UpdateService
.
new
(
project
,
user
,
opts
).
execute
(
issue
)
@issue
=
Issues
::
UpdateService
.
new
(
project
,
user
,
opts
).
execute
(
issue
)
end
@issue
.
reload
@issue
.
reload
end
end
...
...
spec/services/merge_requests/close_service_spec.rb
View file @
f1504e1a
...
@@ -18,8 +18,10 @@ describe MergeRequests::CloseService do
...
@@ -18,8 +18,10 @@ describe MergeRequests::CloseService do
before
do
before
do
allow
(
service
).
to
receive
(
:execute_hooks
)
allow
(
service
).
to
receive
(
:execute_hooks
)
perform_enqueued_jobs
do
@merge_request
=
service
.
execute
(
merge_request
)
@merge_request
=
service
.
execute
(
merge_request
)
end
end
end
it
{
expect
(
@merge_request
).
to
be_valid
}
it
{
expect
(
@merge_request
).
to
be_valid
}
it
{
expect
(
@merge_request
).
to
be_closed
}
it
{
expect
(
@merge_request
).
to
be_closed
}
...
...
spec/services/merge_requests/merge_service_spec.rb
View file @
f1504e1a
...
@@ -17,9 +17,10 @@ describe MergeRequests::MergeService do
...
@@ -17,9 +17,10 @@ describe MergeRequests::MergeService do
before
do
before
do
allow
(
service
).
to
receive
(
:execute_hooks
)
allow
(
service
).
to
receive
(
:execute_hooks
)
perform_enqueued_jobs
do
service
.
execute
(
merge_request
,
'Awesome message'
)
service
.
execute
(
merge_request
,
'Awesome message'
)
end
end
end
it
{
expect
(
merge_request
).
to
be_valid
}
it
{
expect
(
merge_request
).
to
be_valid
}
it
{
expect
(
merge_request
).
to
be_merged
}
it
{
expect
(
merge_request
).
to
be_merged
}
...
...
spec/services/merge_requests/reopen_service_spec.rb
View file @
f1504e1a
...
@@ -19,8 +19,10 @@ describe MergeRequests::ReopenService do
...
@@ -19,8 +19,10 @@ describe MergeRequests::ReopenService do
allow
(
service
).
to
receive
(
:execute_hooks
)
allow
(
service
).
to
receive
(
:execute_hooks
)
merge_request
.
state
=
:closed
merge_request
.
state
=
:closed
perform_enqueued_jobs
do
service
.
execute
(
merge_request
)
service
.
execute
(
merge_request
)
end
end
end
it
{
expect
(
merge_request
).
to
be_valid
}
it
{
expect
(
merge_request
).
to
be_valid
}
it
{
expect
(
merge_request
).
to
be_reopened
}
it
{
expect
(
merge_request
).
to
be_reopened
}
...
...
spec/services/merge_requests/update_service_spec.rb
View file @
f1504e1a
...
@@ -42,9 +42,11 @@ describe MergeRequests::UpdateService do
...
@@ -42,9 +42,11 @@ describe MergeRequests::UpdateService do
before
do
before
do
allow
(
service
).
to
receive
(
:execute_hooks
)
allow
(
service
).
to
receive
(
:execute_hooks
)
perform_enqueued_jobs
do
@merge_request
=
service
.
execute
(
merge_request
)
@merge_request
=
service
.
execute
(
merge_request
)
@merge_request
.
reload
@merge_request
.
reload
end
end
end
it
{
expect
(
@merge_request
).
to
be_valid
}
it
{
expect
(
@merge_request
).
to
be_valid
}
it
{
expect
(
@merge_request
.
title
).
to
eq
(
'New title'
)
}
it
{
expect
(
@merge_request
.
title
).
to
eq
(
'New title'
)
}
...
...
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