BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6c5e20c1
Unverified
Commit
6c5e20c1
authored
Oct 26, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update all status_code calls to use new inspect_requests helper
parent
b5c211ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
user_creates_snippet_spec.rb
spec/features/snippets/user_creates_snippet_spec.rb
+7
-6
No files found.
spec/features/snippets/user_creates_snippet_spec.rb
View file @
6c5e20c1
...
...
@@ -2,6 +2,7 @@ require 'rails_helper'
feature
'User creates snippet'
,
:js
do
include
DropzoneHelper
include
InspectRequests
let
(
:user
)
{
create
(
:user
)
}
...
...
@@ -43,8 +44,8 @@ feature 'User creates snippet', :js do
link
=
find
(
'a.no-attachment-icon img[alt="banana_sample"]'
)[
'src'
]
expect
(
link
).
to
match
(
%r{/uploads/-/system/temp/
\h
{32}/banana_sample
\.
gif
\z
}
)
visit
(
link
)
expect
(
page
.
status_code
).
to
eq
(
200
)
reqs
=
inspect_requests
{
visit
(
link
)
}
expect
(
reqs
.
first
.
status_code
).
to
eq
(
200
)
end
end
...
...
@@ -61,8 +62,8 @@ feature 'User creates snippet', :js do
link
=
find
(
'a.no-attachment-icon img[alt="banana_sample"]'
)[
'src'
]
expect
(
link
).
to
match
(
%r{/uploads/-/system/personal_snippet/
#{
Snippet
.
last
.
id
}
/
\h
{32}/banana_sample
\.
gif
\z
}
)
visit
(
link
)
expect
(
page
.
status_code
).
to
eq
(
200
)
reqs
=
inspect_requests
{
visit
(
link
)
}
expect
(
reqs
.
first
.
status_code
).
to
eq
(
200
)
end
scenario
'validation fails for the first time'
do
...
...
@@ -86,8 +87,8 @@ feature 'User creates snippet', :js do
link
=
find
(
'a.no-attachment-icon img[alt="banana_sample"]'
)[
'src'
]
expect
(
link
).
to
match
(
%r{/uploads/-/system/personal_snippet/
#{
Snippet
.
last
.
id
}
/
\h
{32}/banana_sample
\.
gif
\z
}
)
visit
(
link
)
expect
(
page
.
status_code
).
to
eq
(
200
)
reqs
=
inspect_requests
{
visit
(
link
)
}
expect
(
reqs
.
first
.
status_code
).
to
eq
(
200
)
end
scenario
'Authenticated user creates a snippet with + in filename'
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