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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
b510f8c4
Commit
b510f8c4
authored
Dec 21, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tests
parent
4398bdf2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
spec/observers/issue_observer_spec.rb
spec/observers/issue_observer_spec.rb
+4
-4
spec/tasks/gitlab/backup_rake_spec.rb
spec/tasks/gitlab/backup_rake_spec.rb
+4
-4
No files found.
spec/observers/issue_observer_spec.rb
View file @
b510f8c4
...
...
@@ -85,7 +85,7 @@ describe IssueObserver do
it
'notification is delivered if the issue being closed'
do
issue
.
stub
(
:is_being_closed?
).
and_return
(
true
)
Notify
.
should_receive
(
:issue_status_changed_email
).
twice
Notify
.
should_receive
(
:issue_status_changed_email
).
twice
.
and_return
(
stub
(
deliver:
true
))
Note
.
should_receive
(
:create_status_change_note
).
with
(
issue
,
some_user
,
'closed'
)
subject
.
after_update
(
issue
)
...
...
@@ -104,7 +104,7 @@ describe IssueObserver do
issue_without_assignee
.
stub
(
:is_being_reassigned?
).
and_return
(
false
)
issue_without_assignee
.
stub
(
:is_being_closed?
).
and_return
(
true
)
issue_without_assignee
.
stub
(
:is_being_reopened?
).
and_return
(
false
)
Notify
.
should_receive
(
:issue_status_changed_email
).
once
Notify
.
should_receive
(
:issue_status_changed_email
).
once
.
and_return
(
stub
(
deliver:
true
))
Note
.
should_receive
(
:create_status_change_note
).
with
(
issue_without_assignee
,
some_user
,
'closed'
)
subject
.
after_update
(
issue_without_assignee
)
...
...
@@ -128,7 +128,7 @@ describe IssueObserver do
it
'notification is delivered if the issue being reopened'
do
issue
.
stub
(
:is_being_reopened?
).
and_return
(
true
)
Notify
.
should_receive
(
:issue_status_changed_email
).
twice
Notify
.
should_receive
(
:issue_status_changed_email
).
twice
.
and_return
(
stub
(
deliver:
true
))
Note
.
should_receive
(
:create_status_change_note
).
with
(
issue
,
some_user
,
'reopened'
)
subject
.
after_update
(
issue
)
...
...
@@ -147,7 +147,7 @@ describe IssueObserver do
issue_without_assignee
.
stub
(
:is_being_reassigned?
).
and_return
(
false
)
issue_without_assignee
.
stub
(
:is_being_closed?
).
and_return
(
false
)
issue_without_assignee
.
stub
(
:is_being_reopened?
).
and_return
(
true
)
Notify
.
should_receive
(
:issue_status_changed_email
).
once
Notify
.
should_receive
(
:issue_status_changed_email
).
once
.
and_return
(
stub
(
deliver:
true
))
Note
.
should_receive
(
:create_status_change_note
).
with
(
issue_without_assignee
,
some_user
,
'reopened'
)
subject
.
after_update
(
issue_without_assignee
)
...
...
spec/tasks/gitlab/backup_rake_spec.rb
View file @
b510f8c4
...
...
@@ -15,8 +15,8 @@ describe 'gitlab:app namespace rake task' do
end
let
:run_rake_task
do
Rake
::
Task
[
"gitlab:
app:backup_
restore"
].
reenable
Rake
.
application
.
invoke_task
"gitlab:
app:backup_
restore"
Rake
::
Task
[
"gitlab:
backup:
restore"
].
reenable
Rake
.
application
.
invoke_task
"gitlab:
backup:
restore"
end
context
'gitlab version'
do
...
...
@@ -36,8 +36,8 @@ describe 'gitlab:app namespace rake task' do
it
'should invoke restoration on mach'
do
YAML
.
stub
:load_file
=>
{
:gitlab_version
=>
gitlab_version
}
Rake
::
Task
[
"gitlab:
app:db_
restore"
].
should_receive
:invoke
Rake
::
Task
[
"gitlab:
app:repo_
restore"
].
should_receive
:invoke
Rake
::
Task
[
"gitlab:
backup:db:
restore"
].
should_receive
:invoke
Rake
::
Task
[
"gitlab:
backup:repo:
restore"
].
should_receive
:invoke
expect
{
run_rake_task
}.
to_not
raise_error
SystemExit
end
end
...
...
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