spec/classes/map_spec.rb in fabric-0.3.5 vs spec/classes/map_spec.rb in fabric-0.3.6

- old
+ new

@@ -176,9 +176,16 @@ @map.roles.first(:name => 'test').users.count.should == 0 @map.roles.first(:name => 'test again').users.count.should == 1 end end + describe "with specified :groups" do + it "should add those groups to those users" do + @map.grant 'test_user', :all, :groups => ['test_group'] + User.first(:name => 'test_user').groups.first.name.should == 'test_group' + end + end + it "should raise a Object Not Found if an invalid user identifier is passed" do lambda { @map.grant 'fake_user', 'test' }.should raise_error(DataMapper::ObjectNotFoundError) end it "should raise a Object Not Found if an invalid role identifier is passed" do \ No newline at end of file