module Decko::RestSpecMethods

for use in REST API specs

Public Instance Methods

with_api_key_for(usermark) { |content| ... } click to toggle source
# File lib/decko/rest_spec_helper.rb, line 5
def with_api_key_for usermark
  key_card = Card.fetch [usermark, :account, :api_key], new: {}
  key_card.content = "asdkfjh1023498203jdfs"
  Card::Auth.as_bot { key_card.save! }
  yield key_card.content
end