Sha256: b58faef72479de9a4cb4f4e92bda22a6e06aa8cc9e68ecf91a4d9e6b4aef49fc

Contents?: true

Size: 993 Bytes

Versions: 8

Compression:

Stored size: 993 Bytes

Contents

require 'spec_helper'

# FIXME Relies on spec/dummy/config/initializers/omniauth-identity.rb or you get
# stack/routing/middleware issues.
#
feature "Identity Registration" do
  background do
    FactoryGirl.create(:identity_user, :email => 'user@example.com', :password => 'caplin')
  end

  scenario "Signing up with existing email" do
    visit '/signup'
    fill_in 'Email', :with => 'user@example.com'
    fill_in 'password', :with => 'caplin'
    fill_in 'password_confirmation', :with => 'caplin'
    click_button 'Sign Up'
    page.should have_css('.error')
    page.should have_button('Sign Up')
  end

  scenario "Signing up with valid email" do
    visit '/signup'
    fill_in 'Email', :with => 'diffuser@example.com'
    fill_in 'password', :with => 'secrets'
    fill_in 'password_confirmation', :with => 'secrets'
    click_button 'Sign Up'
    page.should have_text 'Welcome to the app!'
    page.should have_no_css('.error')
    page.should have_no_button('Sign Up')
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
socialite-0.2.1 spec/features/identity_registration_spec.rb
socialite-0.2.0 spec/features/identity_registration_spec.rb
socialite-0.1.2 spec/features/identity_registration_spec.rb
socialite-0.1.1 spec/features/identity_registration_spec.rb
socialite-0.1.0.pre.7 spec/features/identity_registration_spec.rb
socialite-0.1.0.pre.6 spec/features/identity_registration_spec.rb
socialite-0.1.0.pre.5 spec/features/identity_registration_spec.rb
socialite-0.1.0.pre.4 spec/features/identity_registration_spec.rb