diff options
author | winniehell <git@winniehell.de> | 2017-02-10 00:39:04 +0300 |
---|---|---|
committer | winniehell <git@winniehell.de> | 2017-02-11 22:25:44 +0300 |
commit | dd5f32c1996e91a5ca6f699b093624bff7ddc5b3 (patch) | |
tree | aeb15b3471c86b2436fcf2f0870605407c7d9b8c /spec/javascripts/fixtures | |
parent | 534f7f51d53460dea5d6acca5484a6885e2308b7 (diff) |
Replace static fixture for new_branch_spec.js (!9131)
Diffstat (limited to 'spec/javascripts/fixtures')
-rw-r--r-- | spec/javascripts/fixtures/branches.rb | 28 | ||||
-rw-r--r-- | spec/javascripts/fixtures/new_branch.html.haml | 4 |
2 files changed, 28 insertions, 4 deletions
diff --git a/spec/javascripts/fixtures/branches.rb b/spec/javascripts/fixtures/branches.rb new file mode 100644 index 00000000000..0e7c2351b66 --- /dev/null +++ b/spec/javascripts/fixtures/branches.rb @@ -0,0 +1,28 @@ +require 'spec_helper' + +describe Projects::BranchesController, '(JavaScript fixtures)', type: :controller do + include JavaScriptFixturesHelpers + + let(:admin) { create(:admin) } + let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} + let(:project) { create(:project, :repository, namespace: namespace, path: 'branches-project') } + + render_views + + before(:all) do + clean_frontend_fixtures('branches/') + end + + before(:each) do + sign_in(admin) + end + + it 'branches/new_branch.html.raw' do |example| + get :new, + namespace_id: project.namespace.to_param, + project_id: project.to_param + + expect(response).to be_success + store_frontend_fixture(response, example.description) + end +end diff --git a/spec/javascripts/fixtures/new_branch.html.haml b/spec/javascripts/fixtures/new_branch.html.haml deleted file mode 100644 index f06629e5ecc..00000000000 --- a/spec/javascripts/fixtures/new_branch.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -%form.js-create-branch-form - %input.js-branch-name - .js-branch-name-error - %input{id: "ref"} |