spec/groovehq/resource_collection_spec.rb in groovehq-1.0.2 vs spec/groovehq/resource_collection_spec.rb in groovehq-1.0.3
- old
+ new
@@ -5,19 +5,19 @@
let(:client) { GrooveHQ::Client.new("phantogram") }
context "#data" do
it "returns empty data for invalid input" do
- resource = GrooveHQ::ResourceCollection.new(self, "")
+ resource = GrooveHQ::ResourceCollection.new(client, "")
expect(resource.count).to eql(0)
end
it "parses data correctly" do
data = {
tickets: [ { name: "When I am small" } ]
}
- resource = GrooveHQ::ResourceCollection.new(self, data)
+ resource = GrooveHQ::ResourceCollection.new(client, data)
expect(resource.first.name).to eql "When I am small"
end
end
@@ -33,10 +33,10 @@
total_count: 23,
next_page: "http://api.groovehq.dev/v1/tickets?page=2"
}
}
}
- resource = GrooveHQ::ResourceCollection.new(self, data)
+ resource = GrooveHQ::ResourceCollection.new(client, data)
expect(resource.rels[:next]).to be_instance_of(GrooveHQ::Relation)
end
end