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

Integration test with capybara #26

Open
surzycki opened this issue May 7, 2012 · 6 comments
Open

Integration test with capybara #26

surzycki opened this issue May 7, 2012 · 6 comments
Assignees

Comments

@surzycki
Copy link

surzycki commented May 7, 2012

With an integration test that looks like

it 'should make a new user' do
  lambda do
    visit register_path
    fill_in 'first_name',            :with => 'bob'
    fill_in 'last_name',             :with => 'hope'
    fill_in 'email',                 :with => 'bob.hope@nbc.com'
    fill_in 'password',              :with => 'password'
    fill_in 'password_confirmation', :with => 'password'

     click_button 'Go!'
     #    save_and_open_page
     page.current_path.should eq(registration_step_one_path)
  end.should change(User, :count).by(1)
end

The POST path '/auth/identity/register' is not found by Capybara

@wafcio
Copy link

wafcio commented May 9, 2012

You must know that Omniauth use Rack middleware and in test environment Rails using Fake Rack which doesn't have some functionality, maybe it is problem.

@asiniy
Copy link

asiniy commented May 11, 2012

It's interesting for me too

@nickw
Copy link

nickw commented May 21, 2012

Same problem here. Commenting out OmniAuth.config.test_mode = true fixed it for me - although I haven't looked into why yet.

@jjulian
Copy link

jjulian commented Nov 6, 2012

FWIW, setting OmniAuth.config.test_mode = false fixed it for me too.

test 'Visitor can sign up with a username and password' do
  OmniAuth.config.test_mode = false
  # ...test here...
  OmniAuth.config.test_mode = true
end

@jirihradil
Copy link

OmniAuth.config.test_mode = false #works for me too. Thanks guys!

@pboling
Copy link
Member

pboling commented Feb 14, 2021

Will leave this open until I can document this, or determine if it is still the case.

@pboling pboling self-assigned this Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants