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
45e6abff
Commit
45e6abff
authored
Mar 25, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove activity observer specs
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
ba87b76d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
61 deletions
+0
-61
spec/observers/activity_observer_spec.rb
spec/observers/activity_observer_spec.rb
+0
-61
No files found.
spec/observers/activity_observer_spec.rb
deleted
100644 → 0
View file @
ba87b76d
require
'spec_helper'
describe
ActivityObserver
do
let
(
:project
)
{
create
(
:project
)
}
before
{
Thread
.
current
[
:current_user
]
=
create
(
:user
)
}
def
self
.
it_should_be_valid_event
it
{
@event
.
should_not
be_nil
}
it
{
@event
.
project
.
should
==
project
}
end
describe
"Issue created"
do
before
do
Issue
.
observers
.
enable
:activity_observer
do
@issue
=
create
(
:issue
,
project:
project
)
@event
=
Event
.
last
end
end
it_should_be_valid_event
it
{
@event
.
action
.
should
==
Event
::
CREATED
}
it
{
@event
.
target
.
should
==
@issue
}
end
describe
"Issue commented"
do
before
do
Note
.
observers
.
enable
:activity_observer
do
@issue
=
create
(
:issue
,
project:
project
)
@note
=
create
(
:note
,
noteable:
@issue
,
project:
project
,
author:
@issue
.
author
)
@event
=
Event
.
last
end
end
it_should_be_valid_event
it
{
@event
.
action
.
should
==
Event
::
COMMENTED
}
it
{
@event
.
target
.
should
==
@note
}
end
describe
"Ignore system notes"
do
let
(
:author
)
{
create
(
:user
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let!
(
:other
)
{
create
(
:issue
)
}
it
"should not create events for status change notes"
do
expect
do
Note
.
observers
.
enable
:activity_observer
do
Note
.
create_status_change_note
(
issue
,
project
,
author
,
'reopened'
,
nil
)
end
end
.
to_not
change
{
Event
.
count
}
end
it
"should not create events for cross-reference notes"
do
expect
do
Note
.
observers
.
enable
:activity_observer
do
Note
.
create_cross_reference_note
(
issue
,
other
,
author
,
issue
.
project
)
end
end
.
to_not
change
{
Event
.
count
}
end
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