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
94fe5aca
Commit
94fe5aca
authored
Apr 20, 2021
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Speed up specs by using let_it_be
parent
de5dffd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
spec/requests/api/environments_spec.rb
spec/requests/api/environments_spec.rb
+5
-5
No files found.
spec/requests/api/environments_spec.rb
View file @
94fe5aca
...
...
@@ -3,10 +3,10 @@
require
'spec_helper'
RSpec
.
describe
API
::
Environments
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:non_member
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:private
,
:repository
,
namespace:
user
.
namespace
)
}
let
!
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
let
_it_be
(
:user
)
{
create
(
:user
)
}
let
_it_be
(
:non_member
)
{
create
(
:user
)
}
let
_it_be
(
:project
)
{
create
(
:project
,
:private
,
:repository
,
namespace:
user
.
namespace
)
}
let
_it_be_with_reload
(
:environment
)
{
create
(
:environment
,
project:
project
)
}
before
do
project
.
add_maintainer
(
user
)
...
...
@@ -78,7 +78,7 @@ RSpec.describe API::Environments do
end
context
'when filtering'
do
let
!
(
:environment2
)
{
create
(
:environment
,
project:
project
)
}
let
_it_be
(
:environment2
)
{
create
(
:environment
,
project:
project
)
}
it
'returns environment by name'
do
get
api
(
"/projects/
#{
project
.
id
}
/environments?name=
#{
environment
.
name
}
"
,
user
)
...
...
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