atzorvas/ccradio

View on GitHub
test/models/user_test.rb

Summary

Maintainability
A
0 mins
Test Coverage
require 'test_helper'
 
class UserTest < ActiveSupport::TestCase
test "'registered' as a default role for new users" do
Use the new Ruby 1.9 hash syntax.
user = User.create!(:email => 'user@example.com',
Use the new Ruby 1.9 hash syntax.
:password => 'secretpass',
Use the new Ruby 1.9 hash syntax.
:password_confirmation => 'secretpass')
Prefer single-quoted strings when you don't need string interpolation or special symbols.
assert_equal user.role.name, "registered"
end
end