Commit c2443d0a authored by Phil Hughes's avatar Phil Hughes

Merge branch 'winh-delete-static_fixtures.rb' into 'master'

Delete static_fixtures.rb for static HAML fixtures

Closes #59200

See merge request gitlab-org/gitlab-ce!27145
parents 924cd417 2f704d83
%table
%thead
%tr
%th Environment
%th Last deployment
%th Job
%th Commit
%th
%th
%tbody
%tr#environment-row
<table>
<thead>
<tr>
<th>Environment</th>
<th>Last deployment</th>
<th>Job</th>
<th>Commit</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr id="environment-row"></tr>
</tbody>
</table>
require 'spec_helper'
describe ApplicationController, '(Static JavaScript fixtures)', type: :controller do
include JavaScriptFixturesHelpers
Dir.glob('{,ee/}spec/javascripts/fixtures/**/*.haml').map do |file_path|
it "static/#{file_path.sub(%r{\A(ee/)?spec/javascripts/fixtures/}, '').sub(/\.haml\z/, '')}" do |example|
store_frontend_fixture(render_template(file_path), example.description)
end
end
private
def render_template(template_file_name)
controller = ApplicationController.new
controller.prepend_view_path(File.dirname(template_file_name))
controller.render_to_string(template: File.basename(template_file_name), layout: false)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment