Advertisement
DmitrS

register spec

May 11th, 2017
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.46 KB | None | 0 0
  1. require 'rails_helper'
  2.  
  3. RSpec.describe 'signup page', type: :request do
  4.   it 'allows user with valid credentials to signup' do
  5.     user = FactoryGirl.build(:user)
  6.     visit '/signup'
  7.     fill_in 'user_name', with: user.name
  8.     fill_in 'user_email', with: user.email
  9.     fill_in 'user_password', with: 'swordfish'
  10.     fill_in 'user_password_confirmation', with: 'swordfish'
  11.     click_button 'Sign Up'
  12.     expect(page).to have_content user.name
  13.   end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement