Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update user creation to create\!

  • Loading branch information...
commit 81a206102b204100d020869c84979980c7b8cd6e 1 parent 2a449ad
@johnwilliams johnwilliams authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  lib/tasks/user.rake
  2. +1 −1  test/unit/user_test.rb
View
2  lib/tasks/user.rake
@@ -10,7 +10,7 @@ namespace :user do
user_name = ui.ask("User name: ")
password = ui.ask("Password: ")
- user = User.create(:name => name, :email => email,
+ user = User.create!(:name => name, :email => email,
:user_name => user_name, :password => password)
puts "User `#{user_name}' created: ##{user.id}"
View
2  test/unit/user_test.rb
@@ -36,7 +36,7 @@ class UserTest < ActiveSupport::TestCase
test "creating new user with duplicate user name should fail" do
begin
- subscriptions(:john).users.create(:name => "James Johnson",
+ subscriptions(:john).users.create!(:name => "James Johnson",
:email => "james.johnson@domain.test", :user_name => "jjohnson",
:password => "ponies!")
rescue ActiveRecord::RecordInvalid => error
Please sign in to comment.
Something went wrong with that request. Please try again.