spec/support/test_app.rb in ably-0.1.4 vs spec/support/test_app.rb in ably-0.1.5

- old
+ new

@@ -1,11 +1,14 @@ require "singleton" class TestApp APP_SPEC = { 'keys' => [ - {} + {}, + { + 'capability' => '{ "*":["subscribe"], "canpublish:*":["publish"], "canpublish:andpresence":["presence","publish"] }' + } ], 'namespaces' => [ { 'id' => 'persisted', 'persisted' => true } ], 'channels' => [ @@ -42,19 +45,27 @@ def key @attributes["keys"].first end + def restricted_key + @attributes["keys"][1] + end + def key_id - "#{app_id}.#{key["id"]}" + "#{app_id}.#{key['id']}" end def key_value - key["value"] + key['value'] end def api_key "#{key_id}:#{key_value}" + end + + def restricted_api_key + "#{app_id}.#{restricted_key['id']}:#{restricted_key['value']}" end def delete url = "#{sandbox_client.endpoint}/apps/#{app_id}"