1 2 3 4 5 6 7 8 9 10 11 12 13
require "test_helper" class UserTest < ActiveSupport::TestCase test "creating a new user" do assert User.create(handle: 'eilish') end test "cannot create a duplicate user" do assert_raises do User.create!(handle: 'billie') end end end