test/story_test.rb in tracker_api-1.2.1 vs test/story_test.rb in tracker_api-1.3.0

- old
+ new

@@ -7,11 +7,10 @@ let(:project) { VCR.use_cassette('get project') { client.project(project_id) } } let(:story_id) { '66728004' } let(:another_story_id) { '66728000' } let(:story) { VCR.use_cassette('get story') { project.story(story_id) } } - it 'can update an existing story' do new_name = "#{story.name}+" story.name = new_name VCR.use_cassette('save story', record: :new_episodes) do @@ -99,10 +98,26 @@ owner.must_be_instance_of TrackerApi::Resources::Person end end end + describe "updating owners" do + it do + owner_ids = [VCR.use_cassette("get me", record: :new_episodes) { client.me.id }] + + refute_equal story.owner_ids, owner_ids + + story.owner_ids = owner_ids + + VCR.use_cassette("save story with owner_ids changed", record: :new_episodes) do + story.save + end + + story.owner_ids.must_equal owner_ids + end + end + describe '.tasks' do it 'gets all tasks for this story with eager loading' do VCR.use_cassette('get story with tasks', record: :new_episodes) do tasks = project.story(story_id, fields: ':default,tasks').tasks @@ -192,7 +207,6 @@ comment = comments.first comment.must_be_instance_of TrackerApi::Resources::Comment end end end - end