Skip to content

Instantly share code, notes, and snippets.

@jcoyne
Created April 11, 2012 15:43
Show Gist options
  • Save jcoyne/2360123 to your computer and use it in GitHub Desktop.
Save jcoyne/2360123 to your computer and use it in GitHub Desktop.
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