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
2b932015
Commit
2b932015
authored
Dec 02, 2012
by
Alex Denisov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests on EventFilters added
parent
d27cc91e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
features/dashboard/event_filters.feature
features/dashboard/event_filters.feature
+14
-0
features/steps/dashboard/dashboard_event_filters.rb
features/steps/dashboard/dashboard_event_filters.rb
+63
-0
No files found.
features/dashboard/event_filters.feature
0 → 100644
View file @
2b932015
Feature
:
Event filters
Background
:
Given
I sign in as a user
And
I own a project
And
this project has push event
And
this project has new member event
And
this project has merge request event
And
I visit dashboard page
Scenario
:
I
should see all events
Then
I should see push event
Then
I should see new member event
Then
I should see merge request event
features/steps/dashboard/dashboard_event_filters.rb
0 → 100644
View file @
2b932015
class
EventFilters
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedProject
Then
'I should see push event'
do
page
.
find
(
'span.pushed'
).
should
have_content
(
'pushed'
)
end
Then
'I should see new member event'
do
page
.
find
(
'span.joined'
).
should
have_content
(
'joined'
)
end
Then
'I should see merge request event'
do
page
.
find
(
'span.merged'
).
should
have_content
(
'merged'
)
end
And
'this project has push event'
do
data
=
{
before:
"0000000000000000000000000000000000000000"
,
after:
"0220c11b9a3e6c69dc8fd35321254ca9a7b98f7e"
,
ref:
"refs/heads/new_design"
,
user_id:
@user
.
id
,
user_name:
@user
.
name
,
repository:
{
name:
@project
.
name
,
url:
"localhost/rubinius"
,
description:
""
,
homepage:
"localhost/rubinius"
,
private:
true
}
}
@event
=
Event
.
create
(
project:
@project
,
action:
Event
::
Pushed
,
data:
data
,
author_id:
@user
.
id
)
end
And
'this project has new member event'
do
user
=
create
(
:user
,
{
name:
"John Doe"
})
Event
.
create
(
project:
@project
,
author_id:
user
.
id
,
action:
Event
::
Joined
)
end
And
'this project has merge request event'
do
merge_request
=
create
:merge_request
,
author:
@user
,
project:
@project
Event
.
create
(
project:
@project
,
action:
Event
::
Merged
,
target_id:
merge_request
.
id
,
target_type:
"MergeRequest"
,
author_id:
@user
.
id
)
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