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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
d65617aa
Commit
d65617aa
authored
Oct 16, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add feature test for project share
parent
9d972249
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
0 deletions
+63
-0
features/project/group_links.feature
features/project/group_links.feature
+15
-0
features/steps/project/project_group_links.rb
features/steps/project/project_group_links.rb
+48
-0
No files found.
features/project/group_links.feature
0 → 100644
View file @
d65617aa
Feature
:
Project Group Links
Background
:
Given
I sign in as a user
And
I own project
"Shop"
And
project
"Shop"
is shared with group
"Ops"
And
project
"Shop"
is not shared with group
"Market"
And
I visit project group links page
Scenario
:
I
should see list of groups
Then
I should see project already shared with group
"Ops"
Then
I should see project is not shared with group
"Market"
Scenario
:
I
share project with group
When
I select group
"Market"
for share
Then
I should see project is shared with group
"Market"
features/steps/project/project_group_links.rb
0 → 100644
View file @
d65617aa
class
Spinach::Features::ProjectGroupLinks
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedProject
include
SharedPaths
step
'I should see project already shared with group "Ops"'
do
within
'.enabled-groups'
do
page
.
should
have_content
"Ops"
end
end
step
'I should see project is not shared with group "Market"'
do
within
'.enabled-groups'
do
page
.
should_not
have_content
"Market"
end
end
step
'I select group "Market" for share'
do
select
"Master"
,
from:
'group_access'
select
"Market"
,
from:
'group_id'
click_button
"Share"
end
step
'I should see project is shared with group "Market"'
do
within
'.enabled-groups'
do
page
.
should
have_content
"Market"
end
end
step
'project "Shop" is shared with group "Ops"'
do
group
=
create
(
:group
,
name:
'Ops'
)
share_link
=
project
.
project_group_links
.
new
(
group_access:
Gitlab
::
Access
::
MASTER
)
share_link
.
group_id
=
group
.
id
share_link
.
save!
end
step
'project "Shop" is not shared with group "Market"'
do
create
(
:group
,
name:
'Market'
)
end
step
'I visit project group links page'
do
visit
project_group_links_path
(
project
)
end
def
project
@project
||=
Project
.
find_by_name
"Shop"
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