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
7ae2fe13
Commit
7ae2fe13
authored
Dec 30, 2016
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix dynamic u2f fixtures
parent
5f192c77
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
5 deletions
+37
-5
spec/javascripts/fixtures/u2f.rb
spec/javascripts/fixtures/u2f.rb
+35
-0
spec/javascripts/fixtures/u2f/authenticate.html.haml
spec/javascripts/fixtures/u2f/authenticate.html.haml
+0
-1
spec/javascripts/fixtures/u2f/register.html.haml
spec/javascripts/fixtures/u2f/register.html.haml
+0
-2
spec/javascripts/u2f/authenticate_spec.js
spec/javascripts/u2f/authenticate_spec.js
+1
-1
spec/javascripts/u2f/register_spec.js
spec/javascripts/u2f/register_spec.js
+1
-1
No files found.
spec/javascripts/fixtures/u2f.rb
0 → 100644
View file @
7ae2fe13
require
'spec_helper'
describe
SessionsController
,
'(JavaScript fixtures)'
,
type: :controller
do
include
JavaScriptFixturesHelpers
before
(
:all
)
do
clean_frontend_fixtures
(
'u2f/'
)
end
it
'u2f/authenticate.html.raw'
do
|
example
|
fixture
=
render_template
(
'u2f/_authenticate.html.haml'
,
locals:
{
new_user_session_path:
"/users/sign_in"
,
params:
{},
resource_name:
"user"
})
store_frontend_fixture
(
fixture
,
example
.
description
)
end
it
'u2f/register.html.raw'
do
|
example
|
user
=
build
(
:user
,
:two_factor_via_otp
)
fixture
=
render_template
(
'u2f/_register.html.haml'
,
locals:
{
create_u2f_profile_two_factor_auth_path:
'/profile/two_factor_auth/create_u2f'
,
current_user:
user
})
store_frontend_fixture
(
fixture
,
example
.
description
)
end
private
def
render_template
(
template
,
**
args
)
controller
=
ApplicationController
.
new
controller
.
render_to_string
(
template:
template
,
layout:
false
,
**
args
)
end
end
spec/javascripts/fixtures/u2f/authenticate.html.haml
deleted
100644 → 0
View file @
5f192c77
=
render
partial:
"u2f/authenticate"
,
locals:
{
new_user_session_path:
"/users/sign_in"
,
params:
{},
resource_name:
"user"
}
spec/javascripts/fixtures/u2f/register.html.haml
deleted
100644 → 0
View file @
5f192c77
-
user
=
FactoryGirl
.
build
(
:user
,
:two_factor_via_otp
)
=
render
partial:
"u2f/register"
,
locals:
{
create_u2f_profile_two_factor_auth_path:
'/profile/two_factor_auth/create_u2f'
,
current_user:
user
}
spec/javascripts/u2f/authenticate_spec.js
View file @
7ae2fe13
...
...
@@ -10,7 +10,7 @@
(
function
()
{
describe
(
'
U2FAuthenticate
'
,
function
()
{
fixture
.
load
(
'
static/
u2f/authenticate.html.raw
'
);
fixture
.
load
(
'
u2f/authenticate.html.raw
'
);
beforeEach
(
function
()
{
this
.
u2fDevice
=
new
MockU2FDevice
;
this
.
container
=
$
(
"
#js-authenticate-u2f
"
);
...
...
spec/javascripts/u2f/register_spec.js
View file @
7ae2fe13
...
...
@@ -10,7 +10,7 @@
(
function
()
{
describe
(
'
U2FRegister
'
,
function
()
{
fixture
.
load
(
'
static/
u2f/register.html.raw
'
);
fixture
.
load
(
'
u2f/register.html.raw
'
);
beforeEach
(
function
()
{
this
.
u2fDevice
=
new
MockU2FDevice
;
this
.
container
=
$
(
"
#js-register-u2f
"
);
...
...
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