From d8a531687c8aaef67d6b7586916273cf59d4b5a3 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Tue, 14 Jun 2016 10:47:00 +0530 Subject: Fix teaspoon spec. - 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`. --- spec/javascripts/fixtures/u2f/register.html.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.1