Sha256: 2222622cfab9d195c2e44b0cc9d8f0fdbe834f7a2f86c7385ecab5cc45dd0d0d

Contents?: true

Size: 726 Bytes

Versions: 7

Compression:

Stored size: 726 Bytes

Contents

require 'rails_helper'

RSpec.describe 'Nyauth::Registrations' do
  let(:user) { build(:user) }

  feature 'register' do
    background { visit nyauth.new_registration_path }

    scenario 'create user' do
      fill_in('registration_email', with: user.email)
      fill_in('registration_password', with: user.password)
      fill_in('registration_password_confirmation', with: user.password)
      click_button(I18n.t('nav.nyauth.registrations.new'))

      expect(page).to have_content('registration success')
      expect(User.last.email).to eq user.email
    end

    scenario "can't create user" do
      click_button(I18n.t('nav.nyauth.registrations.new'))

      expect(page).to have_content("can't")
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
nyauth-0.7.2 spec/featrues/nyauth/registrations_spec.rb
nyauth-0.7.1 spec/featrues/nyauth/registrations_spec.rb
nyauth-0.7.0 spec/featrues/nyauth/registrations_spec.rb
nyauth-0.6.2 spec/featrues/nyauth/registrations_spec.rb
nyauth-0.6.1 spec/featrues/nyauth/registrations_spec.rb
nyauth-0.6.0 spec/featrues/nyauth/registrations_spec.rb
nyauth-0.5.0 spec/featrues/nyauth/registrations_spec.rb