Sha256: 86b6b5ec3cfc52f9372c9444cee4cb4da3cec49f9f85187dc8efb3b1d5535527

Contents?: true

Size: 652 Bytes

Versions: 2

Compression:

Stored size: 652 Bytes

Contents

module Omniauth

  module Mock
    def auth_mock
      OmniAuth.config.mock_auth[:twitter] = {
        'provider' => 'twitter',
        'uid' => '123545',
        'user_info' => {
          'name' => 'mockuser',
          'image' => 'mock_user_thumbnail_url'
        },
        'credentials' => {
          'token' => 'mock_token',
          'secret' => 'mock_secret'
        }
      }
    end
  end

  module SessionHelpers
    def signin
      visit root_path
      expect(page).to have_content("Sign in")
      auth_mock
      click_link "Sign in"
      fill_in 'user_email', with: 'test@example.com'
      click_button "Sign in"
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_apps_testing-0.3.4 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb
rails_apps_testing-0.3.3 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb