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
d14e25e9
Commit
d14e25e9
authored
Apr 21, 2019
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Call store_frontend_fixture() in JavaScriptFixturesHelpers
parent
9d445026
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
spec/support/helpers/javascript_fixtures_helpers.rb
spec/support/helpers/javascript_fixtures_helpers.rb
+11
-7
No files found.
spec/support/helpers/javascript_fixtures_helpers.rb
View file @
d14e25e9
...
...
@@ -11,6 +11,10 @@ module JavaScriptFixturesHelpers
base
.
around
do
|
example
|
# pick an arbitrary date from the past, so tests are not time dependent
Timecop
.
freeze
(
Time
.
utc
(
2015
,
7
,
3
,
10
))
{
example
.
run
}
raise
NoMethodError
.
new
(
'You need to set `response` for the fixture generator! This will automatically happen with `type: :controller` or `type: :request`.'
,
'response'
)
unless
respond_to?
(
:response
)
store_frontend_fixture
(
response
,
example
.
description
)
end
end
...
...
@@ -29,7 +33,13 @@ module JavaScriptFixturesHelpers
end
end
# Public: Store a response object as fixture file
def
remove_repository
(
project
)
Gitlab
::
Shell
.
new
.
remove_repository
(
project
.
repository_storage
,
project
.
disk_path
)
end
private
# Private: Store a response object as fixture file
#
# response - string or response object to store
# fixture_file_name - file name to store the fixture in (relative to .fixture_root_path)
...
...
@@ -42,12 +52,6 @@ module JavaScriptFixturesHelpers
File
.
write
(
full_fixture_path
,
fixture
)
end
def
remove_repository
(
project
)
Gitlab
::
Shell
.
new
.
remove_repository
(
project
.
repository_storage
,
project
.
disk_path
)
end
private
# Private: Prepare a response object for use as a frontend fixture
#
# response - response object to prepare
...
...
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