Created
April 11, 2012 15:43
-
-
Save jcoyne/2360123 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context "with rightsMetadata" do | |
subject do | |
m = ModsArticle.new() | |
m.rightsMetadata.update_permissions("group"=>{"group-7"=>'read', 'group-8'=>'edit'}) | |
m.save | |
m | |
end | |
it "should have read groups accessor" do | |
subject.read_groups.should == ['group-7'] | |
end | |
it "should have read groups writer" do | |
subject.read_groups = ['group-2', 'group-3'] | |
subject.rightsMetadata.groups.should == {'group-2' => 'read', 'group-3'=>'read', 'group-8' => 'edit'} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment