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
Jérome Perrin
gitlab-ce
Commits
dd5f32c1
Commit
dd5f32c1
authored
Feb 09, 2017
by
winniehell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace static fixture for new_branch_spec.js (!9131)
parent
534f7f51
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
6 deletions
+34
-6
changelogs/unreleased/new-branch-fixture.yml
changelogs/unreleased/new-branch-fixture.yml
+4
-0
spec/javascripts/fixtures/branches.rb
spec/javascripts/fixtures/branches.rb
+28
-0
spec/javascripts/fixtures/new_branch.html.haml
spec/javascripts/fixtures/new_branch.html.haml
+0
-4
spec/javascripts/new_branch_spec.js
spec/javascripts/new_branch_spec.js
+2
-2
No files found.
changelogs/unreleased/new-branch-fixture.yml
0 → 100644
View file @
dd5f32c1
---
title
:
Replace static fixture for new_branch_spec.js
merge_request
:
9131
author
:
winniehell
spec/javascripts/fixtures/branches.rb
0 → 100644
View file @
dd5f32c1
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
spec/javascripts/fixtures/new_branch.html.haml
deleted
100644 → 0
View file @
534f7f51
%form
.js-create-branch-form
%input
.js-branch-name
.js-branch-name-error
%input
{
id:
"ref"
}
spec/javascripts/new_branch_spec.js
View file @
dd5f32c1
...
@@ -8,7 +8,7 @@ require('~/new_branch_form');
...
@@ -8,7 +8,7 @@ require('~/new_branch_form');
describe
(
'
Branch
'
,
function
()
{
describe
(
'
Branch
'
,
function
()
{
return
describe
(
'
create a new branch
'
,
function
()
{
return
describe
(
'
create a new branch
'
,
function
()
{
var
expectToHaveError
,
fillNameWith
;
var
expectToHaveError
,
fillNameWith
;
preloadFixtures
(
'
static
/new_branch.html.raw
'
);
preloadFixtures
(
'
branches
/new_branch.html.raw
'
);
fillNameWith
=
function
(
value
)
{
fillNameWith
=
function
(
value
)
{
return
$
(
'
.js-branch-name
'
).
val
(
value
).
trigger
(
'
blur
'
);
return
$
(
'
.js-branch-name
'
).
val
(
value
).
trigger
(
'
blur
'
);
};
};
...
@@ -16,7 +16,7 @@ require('~/new_branch_form');
...
@@ -16,7 +16,7 @@ require('~/new_branch_form');
return
expect
(
$
(
'
.js-branch-name-error span
'
).
text
()).
toEqual
(
error
);
return
expect
(
$
(
'
.js-branch-name-error span
'
).
text
()).
toEqual
(
error
);
};
};
beforeEach
(
function
()
{
beforeEach
(
function
()
{
loadFixtures
(
'
static
/new_branch.html.raw
'
);
loadFixtures
(
'
branches
/new_branch.html.raw
'
);
$
(
'
form
'
).
on
(
'
submit
'
,
function
(
e
)
{
$
(
'
form
'
).
on
(
'
submit
'
,
function
(
e
)
{
return
e
.
preventDefault
();
return
e
.
preventDefault
();
});
});
...
...
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