learn-co-curriculum / omniauth_lab

Other
1 stars 349 forks source link

Conflict between provided welcome/home view and RSPEC capybara validation #35

Closed orchardtree closed 3 years ago

orchardtree commented 3 years ago

The RSPEC is looking for text that is not generated by the provided home.html.erb page. The link_to links include "method: :post", which generates HTML code that is not accounted for in RSPEC (Capybara) tests.


VIEW - welcome/home.html.erb

<p>Try <%= link_to 'Signing in with the developer strategy', '/auth/developer', method: :post %>.</p> <p>Try <%= link_to 'Signing in with the GitHub strategy', '/auth/github', method: :post %>.</p>


RSPEC

require 'rails_helper'

RSpec.describe "welcome/home", type: :view, developer_strategy: true do it 'offers signup with developer' do render expect(rendered).to include('<a href="/auth/developer">Signing in with the developer strategy</a>') end

it 'offers signup with GitHub' do render expect(rendered).to include('<a href="/auth/github">Signing in with the GitHub strategy</a>') end end

bal360 commented 3 years ago

Thank you for spotting this issue and providing feedback.

We have updated the materials and believe your issue to have been resolved.

We apologize for any frustration you might have encountered during this process but thank you for helping us ensure that those who follow in your path will not encounter the same problems that you faced.

If you do not believe that this issue has been addressed, please re-open this issue. 💙