Skip to content

Commit d9ab717

Browse files
committed
Updated/removed pending specs
1 parent 8eba2b6 commit d9ab717

4 files changed

Lines changed: 16 additions & 13 deletions

File tree

lib/buff/update.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def updates_by_profile_id(id, options={})
1919
end
2020

2121
def interactions_by_update_id(id, options={})
22+
check_id(id)
2223
response = get("/updates/#{id}/interactions.json", options)
2324
interactions = response['interactions'].map { |r| Buff::Interaction.new(r) }
2425
Buff::Interactions.new(

spec/lib/buff/schedule_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
end
6969

7070
describe "#set_schedules" do
71-
xit "throw error if schedules is empty" do
71+
let(:id) { "5160746d54f04a5e3a00000f" }
72+
it "throw error if schedules is empty" do
7273
lambda {
7374
Buff::Client.new("some_token").set_schedules(id) }.
7475
should raise_error(ArgumentError)

spec/lib/buff/update_spec.rb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,20 @@
6060
end
6161

6262
describe "#interactions_by_update_id" do
63-
xit "requires an id"
64-
xit "connects to the correct endpoint"
65-
xit "returns an object where total is accessible"
66-
it "allows optional params" do
67-
url = "https://api.bufferapp.com/1/updates/4ecda476542f7ee521000006/interactions.json?access_token=some_token&page=2"
68-
id = "4ecda476542f7ee521000006"
63+
let(:url) { "https://api.bufferapp.com/1/updates/4ecda476542f7ee521000006/interactions.json?access_token=some_token&page=2" }
64+
let(:id) { "4ecda476542f7ee521000006" }
65+
66+
before do
6967
stub_request(:get, url).
7068
to_return(fixture("interactions_by_update_id.txt"))
69+
end
70+
71+
it "requires an id" do
72+
lambda { client.interactions_by_update_id(page: 2) }.
73+
should raise_error(Buff::InvalidIdLength)
74+
end
75+
76+
it "allows optional params" do
7177
client.interactions_by_update_id(id, page: 2)
7278
end
7379
end

spec/lib/core_spec.rb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,14 @@
3535
should eq(true)
3636
end
3737

38-
xit "does not delegate to #handle_response_code when code = 200" do
38+
it "does not delegate to #handle_response_code when code = 200" do
3939
url = "#{base_path}/info/configuration.json"
4040
fixture_name = "link.txt"
4141
stub_with_to_return(:get, url, fixture_name)
4242
client.should_not_receive(:handle_response_code)
4343
client.info
4444
end
4545

46-
xit "transforms sample_schedule into correct formatted url" do
47-
u = Addressable::URI.new
48-
u.query_values = {schedules: sample_schedules[0]}
49-
u.query.should eq(post_data)
50-
end
5146
end
5247

5348
describe "#handle_response_code" do

0 commit comments

Comments
 (0)