Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes invalid mapping in shared/social partial #215

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

artplan1
Copy link

Fixes #202

Added tests for account page

@@ -0,0 +1,3 @@
RSpec.configure do |config|

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing magic comment # frozen_string_literal: true.

api_secret: 'fake',
environment: Rails.env,
active: true)
create(:authentication_method, provider: 'twitter')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

api_secret: 'fake',
environment: Rails.env,
active: true)
create(:authentication_method, provider: 'facebook')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

end

it 'shows method as connected' do
expect(page).to have_text('You Have Signed In With These Services')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

expect(page).not_to have_link(title: Spree.t(:sign_in_with, provider: authentication_method.provider))
end

it 'shows method as connected' do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

visit '/account'
end

it 'shows possible methods to connect' do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

let!(:authentication_method) { create(:authentication_method) }

before do
visit '/account'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

login_as(user, scope: :spree_user)
end

context 'with existing active authentication methods' do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@@ -0,0 +1,35 @@
RSpec.feature 'account page visit', :js do

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Block has too many lines. [26/25]
Missing magic comment # frozen_string_literal: true.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

FactoryBot.define do
factory :user_authentication, class: Spree::UserAuthentication do
provider 'facebook'
uid 'fake'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants