Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a small bug in the way that tasks are associated with parent st…

…ories
  • Loading branch information...
commit eb36fa6dfdaef4f770b53717f6a6637c7ef9e59b 1 parent 235b6f2
@douglasjsellers douglasjsellers authored
View
1  lib/pivotal-tracker/task.rb
@@ -17,6 +17,7 @@ def all(story, options={})
element :position, Integer
element :complete, Boolean
element :created_at, DateTime
+ has_one :story, Story
def initialize(attributes={})
if attributes[:owner]
View
7 spec/fixtures/stale_fish.yml
@@ -28,6 +28,13 @@
request_type: GET
update_method: StaleFishFixtures.update_tasks_fixture
last_updated_at: 2010-07-29T20:15:10+01:00
+ - create_tasks:
+ file: 'tasks.xml'
+ update_interval: 2.weeks
+ check_against: http://www.pivotaltracker.com/services/v3/projects/102622/stories/4459994/tasks
+ request_type: POST
+ update_method: StaleFishFixtures.update_tasks_fixture
+ last_updated_at: 2010-07-29T20:15:10+01:00
- project:
file: 'project.xml'
update_interval: 2.weeks
View
7 spec/pivotal-tracker/task_spec.rb
@@ -18,4 +18,11 @@
@story.tasks.find(468113).should be_a(PivotalTracker::Task)
end
end
+
+ context ".create" do
+ it "should return the created task" do
+ @story.tasks.create(:description => 'Test task')
+ end
+ end
+
end
Please sign in to comment.
Something went wrong with that request. Please try again.