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
Boxiang Sun
gitlab-ce
Commits
178e2758
Commit
178e2758
authored
Sep 09, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs that requires an access request
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
6b02127f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
spec/helpers/members_helper_spec.rb
spec/helpers/members_helper_spec.rb
+2
-2
spec/mailers/notify_spec.rb
spec/mailers/notify_spec.rb
+2
-2
spec/models/member_spec.rb
spec/models/member_spec.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
spec/models/project_team_spec.rb
spec/models/project_team_spec.rb
+2
-2
No files found.
spec/helpers/members_helper_spec.rb
View file @
178e2758
...
...
@@ -11,7 +11,7 @@ describe MembersHelper do
describe
'#remove_member_message'
do
let
(
:requester
)
{
build
(
:user
)
}
let
(
:project
)
{
create
(
:
project
)
}
let
(
:project
)
{
create
(
:
empty_project
,
:public
)
}
let
(
:project_member
)
{
build
(
:project_member
,
project:
project
)
}
let
(
:project_member_invite
)
{
build
(
:project_member
,
project:
project
).
tap
{
|
m
|
m
.
generate_invite_token!
}
}
let
(
:project_member_request
)
{
project
.
request_access
(
requester
)
}
...
...
@@ -32,7 +32,7 @@ describe MembersHelper do
describe
'#remove_member_title'
do
let
(
:requester
)
{
build
(
:user
)
}
let
(
:project
)
{
create
(
:
project
)
}
let
(
:project
)
{
create
(
:
empty_project
,
:public
)
}
let
(
:project_member
)
{
build
(
:project_member
,
project:
project
)
}
let
(
:project_member_request
)
{
project
.
request_access
(
requester
)
}
let
(
:group
)
{
create
(
:group
)
}
...
...
spec/mailers/notify_spec.rb
View file @
178e2758
...
...
@@ -402,7 +402,7 @@ describe Notify do
describe
'project access requested'
do
context
'for a project in a user namespace'
do
let
(
:project
)
{
create
(
:project
).
tap
{
|
p
|
p
.
team
<<
[
p
.
owner
,
:master
,
p
.
owner
]
}
}
let
(
:project
)
{
create
(
:project
,
:public
).
tap
{
|
p
|
p
.
team
<<
[
p
.
owner
,
:master
,
p
.
owner
]
}
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project_member
)
do
project
.
request_access
(
user
)
...
...
@@ -429,7 +429,7 @@ describe Notify do
context
'for a project in a group'
do
let
(
:group_owner
)
{
create
(
:user
)
}
let
(
:group
)
{
create
(
:group
).
tap
{
|
g
|
g
.
add_owner
(
group_owner
)
}
}
let
(
:project
)
{
create
(
:project
,
namespace:
group
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
group
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project_member
)
do
project
.
request_access
(
user
)
...
...
spec/models/member_spec.rb
View file @
178e2758
...
...
@@ -57,7 +57,7 @@ describe Member, models: true do
describe
'Scopes & finders'
do
before
do
project
=
create
(
:empty_project
)
project
=
create
(
:empty_project
,
:public
)
group
=
create
(
:group
)
@owner_user
=
create
(
:user
).
tap
{
|
u
|
group
.
add_owner
(
u
)
}
@owner
=
group
.
members
.
find_by
(
user_id:
@owner_user
.
id
)
...
...
spec/models/project_spec.rb
View file @
178e2758
...
...
@@ -68,7 +68,7 @@ describe Project, models: true do
it
{
is_expected
.
to
have_many
(
:forks
).
through
(
:forked_project_links
)
}
describe
'#members & #requesters'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:requester
)
{
create
(
:user
)
}
let
(
:developer
)
{
create
(
:user
)
}
before
do
...
...
spec/models/project_team_spec.rb
View file @
178e2758
...
...
@@ -137,7 +137,7 @@ describe ProjectTeam, models: true do
describe
'#find_member'
do
context
'personal project'
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
let
(
:requester
)
{
create
(
:user
)
}
before
do
...
...
@@ -200,7 +200,7 @@ describe ProjectTeam, models: true do
let
(
:requester
)
{
create
(
:user
)
}
context
'personal project'
do
let
(
:project
)
{
create
(
:empty_project
)
}
let
(
:project
)
{
create
(
:empty_project
,
:public
)
}
context
'when project is not shared with group'
do
before
do
...
...
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