Sha256: fcd5c7a6cc0737514dbe2d1a78d5dc0a7cdfc63b261fc2c18f706fe85b87309f

Contents?: true

Size: 522 Bytes

Versions: 6

Compression:

Stored size: 522 Bytes

Contents

module Omniauth

  module Mock
    def auth_mock
      OmniAuth.config.mock_auth[:twitter] = {
        'provider' => 'twitter',
        'uid' => '123545',
        'user_info' => {
          'name' => 'mockuser'
        },
        '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"
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_apps_testing-0.3.13 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb
rails_apps_testing-0.3.12 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb
rails_apps_testing-0.3.11 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb
rails_apps_testing-0.3.10 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb
rails_apps_testing-0.3.9 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb
rails_apps_testing-0.3.8 lib/generators/testing/configure/templates/spec/omniauth/support/helpers/omniauth.rb