Sha256: e35db07121ba021dc92a806dd62b32adcd3e3094f9c54a7e85c4cf5e60d469d2
Contents?: true
Size: 1.17 KB
Versions: 1
Compression:
Stored size: 1.17 KB
Contents
require 'spec_helper' describe PivotalTracker::Activity do context "without a specified project" do it "should return an array of activities" do PivotalTracker::Activity.all.should be_a(Array) PivotalTracker::Activity.all.first.should be_a(PivotalTracker::Activity) end end context "with a specified project" do before do @project = PivotalTracker::Project.find(PROJECT_ID) end it "should return an array of activities" do @project.activities.all.should be_a(Array) @project.activities.all.first.should be_a(PivotalTracker::Activity) end end context "with a specified occurred since date filter" do it "should correctly url encode the occurred since date filter in the API call" do expect(PivotalTracker::Client).to receive(:connection).and_return(connection = double("Client Connection")) url = "/activities?limit=100&occurred_since_date=2010/07/29%2019:13:00%20+00:00" connection.should_receive(:[]).with(url).and_return double("Connection", :get => '<blah></blah>') PivotalTracker::Activity.all nil, :limit => 100, :occurred_since_date => DateTime.parse("2010/7/29 19:13:00 UTC") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pivotal-tracker-0.5.13 | spec/pivotal-tracker/activity_spec.rb |