diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-06-14 10:47:00 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-06-15 08:16:57 +0530 |
commit | d8a531687c8aaef67d6b7586916273cf59d4b5a3 (patch) | |
tree | 71b529d5df7435b8f9d7b145f2f2641a43e5047a | |
parent | 298eb449f3365a8f753dc6c08b51e2a8cb6e972c (diff) | |
download | gitlab-ce-17333-u2f-only-after-authenticator.tar.gz |
Fix teaspoon spec.17333-u2f-only-after-authenticator
- 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.haml | 3 |
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 } |