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
5d15b84c
Commit
5d15b84c
authored
Feb 18, 2020
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace set with let_it_be in spec/policies
Removes usage of `set` in specs
parent
5b2e81f6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
spec/policies/application_setting/term_policy_spec.rb
spec/policies/application_setting/term_policy_spec.rb
+1
-1
spec/policies/ci/pipeline_schedule_policy_spec.rb
spec/policies/ci/pipeline_schedule_policy_spec.rb
+3
-3
spec/policies/project_policy_spec.rb
spec/policies/project_policy_spec.rb
+6
-6
spec/policies/resource_label_event_policy_spec.rb
spec/policies/resource_label_event_policy_spec.rb
+4
-4
No files found.
spec/policies/application_setting/term_policy_spec.rb
View file @
5d15b84c
...
...
@@ -5,7 +5,7 @@ require 'spec_helper'
describe
ApplicationSetting
::
TermPolicy
do
include
TermsHelper
set
(
:term
)
{
create
(
:term
)
}
let_it_be
(
:term
)
{
create
(
:term
)
}
let
(
:user
)
{
create
(
:user
)
}
subject
(
:policy
)
{
described_class
.
new
(
user
,
term
)
}
...
...
spec/policies/ci/pipeline_schedule_policy_spec.rb
View file @
5d15b84c
...
...
@@ -3,9 +3,9 @@
require
'spec_helper'
describe
Ci
::
PipelineSchedulePolicy
,
:models
do
set
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:repository
)
}
set
(
:pipeline_schedul
e
)
{
create
(
:ci_pipeline_schedule
,
:nightly
,
project:
project
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:repository
)
}
let_it_be
(
:pipeline_schedule
,
reload:
tru
e
)
{
create
(
:ci_pipeline_schedule
,
:nightly
,
project:
project
)
}
let
(
:policy
)
do
described_class
.
new
(
user
,
pipeline_schedule
)
...
...
spec/policies/project_policy_spec.rb
View file @
5d15b84c
...
...
@@ -5,12 +5,12 @@ require 'spec_helper'
describe
ProjectPolicy
do
include
ExternalAuthorizationServiceHelpers
include_context
'ProjectPolicy context'
set
(
:guest
)
{
create
(
:user
)
}
set
(
:reporter
)
{
create
(
:user
)
}
set
(
:developer
)
{
create
(
:user
)
}
set
(
:maintainer
)
{
create
(
:user
)
}
set
(
:owner
)
{
create
(
:user
)
}
set
(
:admin
)
{
create
(
:admin
)
}
let_it_be
(
:guest
)
{
create
(
:user
)
}
let_it_be
(
:reporter
)
{
create
(
:user
)
}
let_it_be
(
:developer
)
{
create
(
:user
)
}
let_it_be
(
:maintainer
)
{
create
(
:user
)
}
let_it_be
(
:owner
)
{
create
(
:user
)
}
let_it_be
(
:admin
)
{
create
(
:admin
)
}
let
(
:project
)
{
create
(
:project
,
:public
,
namespace:
owner
.
namespace
)
}
let
(
:base_guest_permissions
)
do
...
...
spec/policies/resource_label_event_policy_spec.rb
View file @
5d15b84c
...
...
@@ -3,10 +3,10 @@
require
'spec_helper'
describe
ResourceLabelEventPolicy
do
set
(
:user
)
{
create
(
:user
)
}
set
(
:project
)
{
create
(
:project
,
:private
)
}
set
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
set
(
:private_project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:user
)
{
create
(
:user
)
}
let_it_be
(
:project
)
{
create
(
:project
,
:private
)
}
let_it_be
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let_it_be
(
:private_project
)
{
create
(
:project
,
:private
)
}
describe
'#read_resource_label_event'
do
context
'with non-member user'
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