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
6c5e20c1
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
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
spec/features/snippets/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