BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ec437ad9
Unverified
Commit
ec437ad9
authored
Feb 10, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more tests for FilteringService
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
56f989e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
filtering_service_spec.rb
spec/services/filtering_service_spec.rb
+16
-0
No files found.
spec/services/filtering_service_spec.rb
View file @
ec437ad9
...
@@ -15,6 +15,7 @@ describe FilteringService do
...
@@ -15,6 +15,7 @@ describe FilteringService do
before
do
before
do
project1
.
team
<<
[
user
,
:master
]
project1
.
team
<<
[
user
,
:master
]
project2
.
team
<<
[
user
,
:developer
]
project2
.
team
<<
[
user
,
:developer
]
project2
.
team
<<
[
user2
,
:developer
]
end
end
describe
'merge requests'
do
describe
'merge requests'
do
...
@@ -61,5 +62,20 @@ describe FilteringService do
...
@@ -61,5 +62,20 @@ describe FilteringService do
issues
=
FilteringService
.
new
.
execute
(
Issue
,
user
,
params
)
issues
=
FilteringService
.
new
.
execute
(
Issue
,
user
,
params
)
issues
.
size
.
should
==
1
issues
.
size
.
should
==
1
end
end
it
'should be empty for unauthorized user'
do
params
=
{
scope:
"all"
,
state:
'opened'
}
issues
=
FilteringService
.
new
.
execute
(
Issue
,
nil
,
params
)
issues
.
size
.
should
be_zero
end
it
'should not include unauthorized issues'
do
params
=
{
scope:
"all"
,
state:
'opened'
}
issues
=
FilteringService
.
new
.
execute
(
Issue
,
user2
,
params
)
issues
.
size
.
should
==
2
issues
.
should_not
include
(
issue1
)
issues
.
should
include
(
issue2
)
issues
.
should
include
(
issue3
)
end
end
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