Sha256: 28f0888ae3c912a3a19ace040c43c13028b8acac9f510029fcf8d9933c6e4bd2
Contents?: true
Size: 1.08 KB
Versions: 1
Compression:
Stored size: 1.08 KB
Contents
require_relative 'minitest_helper' describe TrackerApi::Resources::Story do let(:pt_user) { PT_USER_1 } let(:client) { TrackerApi::Client.new token: pt_user[:token] } let(:project_id) { pt_user[:project_id] } let(:project) { VCR.use_cassette('get project') { client.project(project_id) } } describe '.tasks' do it 'gets all tasks for this story' do VCR.use_cassette('get tasks', record: :new_episodes) do tasks = project.story('66728004').tasks tasks.wont_be_empty task = tasks.first task.must_be_instance_of TrackerApi::Resources::Task end end it 'gets all tasks even when the project_id is excluded from the story fields' do VCR.use_cassette('get tasks when stories filtered', record: :new_episodes) do stories = project.stories(with_state: 'unstarted', fields: 'name,story_type') stories.each do |story| tasks = story.tasks unless tasks.empty? task = tasks.first task.must_be_instance_of TrackerApi::Resources::Task end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tracker_api-0.2.6 | test/story_test.rb |