users_spec.rb 464 Bytes
Newer Older
1 2
require 'spec_helper'

3
describe 'Users', feature: true do
4
  describe "GET /users/sign_in" do
5
    it "should create a new user account" do
6
      visit new_user_session_path
7 8 9
      fill_in "user_name", with: "Name Surname"
      fill_in "user_username", with: "Great"
      fill_in "user_email", with: "name@mail.com"
10 11
      fill_in "user_password_sign_up", with: "password1234"
      expect { click_button "Sign up" }.to change { User.count }.by(1)
12 13 14
    end
  end
end