Sha256: 491a21d6a70249a3fb75fbdba413e3382b9518b0b493c5c6c9e92190726eaefa
Contents?: true
Size: 553 Bytes
Versions: 3
Compression:
Stored size: 553 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe Ability do describe "initialize" do it "should automatically add logged-in users to 'registered' group" do mock_user = mock("User") mock_user.stubs(:email).returns "logged_in_person@example.com" mock_user.stubs(:is_being_superuser?).returns false ability = Ability.new(nil) ability.user_groups.should_not include 'registered' ability = Ability.new(mock_user) ability.user_groups.should include 'registered' end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hydra-head-4.0.0.rc5 | test_support/spec/models/ability_spec.rb |
hydra-head-4.0.0.rc4 | test_support/spec/models/ability_spec.rb |
hydra-head-4.0.0.rc3 | test_support/spec/models/ability_spec.rb |