Skip to content

Instantly share code, notes, and snippets.

@paul
Created November 25, 2008 23:44
Show Gist options
  • Save paul/29172 to your computer and use it in GitHub Desktop.
Save paul/29172 to your computer and use it in GitHub Desktop.
describe 'POST SSKJ1 to /privileges', :type => 'service' do
extend ServiceHelpers::Group
include ServiceHelpers::Example
def post_privilege(pairs = {})
post_sskj1(privileges_url, privilege_sskj1_json(pairs))
end
request do |attributes|
post_privilege(attributes)
end
should_be_created
should_require_pairs :name
should_ignore_pairs :href, :id, :_type
should_invalidate_pairs :name, :with => ['Test', 'test-priv', 'test1']
should_require_privilege :create_privilege
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment