Sha256: b37e4049225de00ee1c7f617714e6ed948564cd593c4981e5365e0f859722711
Contents?: true
Size: 599 Bytes
Versions: 6
Compression:
Stored size: 599 Bytes
Contents
require "test/test_helper" class HasRoleOptionsTest < ActiveSupport::TestCase context "A record with a custom role field" do setup do @soldier = Soldier.new end should "allow its role to be written and read" do @soldier.role = "guest" assert "guest", @soldier.role.name end should "store the role name in the custom field" do assert "guest", @soldier.rank end should "still work with permissions" do @soldier.role = "guest" assert @soldier.may_hug? assert !@soldier.may_update_users? end end end
Version data entries
6 entries across 6 versions & 3 rubygems