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
7b87fcba
Commit
7b87fcba
authored
Jun 22, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken factory
parent
529feb4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
spec/factories.rb
spec/factories.rb
+0
-1
spec/models/user_spec.rb
spec/models/user_spec.rb
+2
-2
No files found.
spec/factories.rb
View file @
7b87fcba
...
@@ -27,7 +27,6 @@ FactoryGirl.define do
...
@@ -27,7 +27,6 @@ FactoryGirl.define do
sequence
(
:name
)
{
|
n
|
"project
#{
n
}
"
}
sequence
(
:name
)
{
|
n
|
"project
#{
n
}
"
}
path
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
path
{
name
.
downcase
.
gsub
(
/\s/
,
'_'
)
}
creator
creator
namespace
{
creator
.
namespace
}
end
end
factory
:redmine_project
,
parent: :project
do
factory
:redmine_project
,
parent: :project
do
...
...
spec/models/user_spec.rb
View file @
7b87fcba
...
@@ -108,8 +108,8 @@ describe User do
...
@@ -108,8 +108,8 @@ describe User do
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
ActiveRecord
::
Base
.
observers
.
enable
(
:user_observer
)
@user
=
create
:user
@user
=
create
:user
@project
=
create
:project
,
namespace:
@user
.
namespace
@project
=
create
:project
,
namespace:
@user
.
namespace
@project_2
=
create
:project
# Grant MASTER access to the user
@project_2
=
create
:project
,
group:
create
(
:group
)
# Grant MASTER access to the user
@project_3
=
create
:project
# Grant DEVELOPER access to the user
@project_3
=
create
:project
,
group:
create
(
:group
)
# Grant DEVELOPER access to the user
@project_2
.
team
<<
[
@user
,
:master
]
@project_2
.
team
<<
[
@user
,
:master
]
@project_3
.
team
<<
[
@user
,
:developer
]
@project_3
.
team
<<
[
@user
,
:developer
]
...
...
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