spec/synchrony/synchrony_spec.rb in keen-0.4.4 vs spec/synchrony/synchrony_spec.rb in keen-0.5.0
- old
+ new
@@ -1,26 +1,23 @@
require File.expand_path("../spec_helper", __FILE__)
describe Keen::HTTP::Async do
let(:project_id) { "12345" }
- let(:api_key) { "abcde" }
let(:collection) { "users" }
let(:event_properties) { { "name" => "Bob" } }
let(:api_success) { { "created" => true } }
describe "synchrony" do
before do
- @client = Keen::Client.new(
- :project_id => project_id,
- :api_key => api_key)
+ @client = Keen::Client.new(:project_id => project_id)
end
describe "success" do
it "should post the event data" do
stub_api(api_url(collection), 201, api_success)
EM.synchrony {
@client.publish_async(collection, event_properties)
- expect_post(api_url(collection), event_properties, api_key, "async")
+ expect_post(api_url(collection), event_properties, "async")
EM.stop
}
end
it "should recieve the right response 'synchronously'" do