summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-06-14 10:47:00 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-06-15 08:16:57 +0530
commitd8a531687c8aaef67d6b7586916273cf59d4b5a3 (patch)
tree71b529d5df7435b8f9d7b145f2f2641a43e5047a
parent298eb449f3365a8f753dc6c08b51e2a8cb6e972c (diff)
downloadgitlab-ce-17333-u2f-only-after-authenticator.tar.gz
- We added a `current_user.two_factor_via_otp?` check to the view. When rendering the view via the teaspoon fixture, `current_user` is `nil`.
-rw-r--r--spec/javascripts/fixtures/u2f/register.html.haml3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/javascripts/fixtures/u2f/register.html.haml b/spec/javascripts/fixtures/u2f/register.html.haml
index 393c0613fd3..5ed51be689c 100644
--- a/spec/javascripts/fixtures/u2f/register.html.haml
+++ b/spec/javascripts/fixtures/u2f/register.html.haml
@@ -1 +1,2 @@
-= render partial: "u2f/register", locals: { create_u2f_profile_two_factor_auth_path: '/profile/two_factor_auth/create_u2f' }
+- 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 }