Sha256: 496272865622dadc80f7fe4f3b722ecf2158a1fd3ea491aac8079d5f30d83287

Contents?: true

Size: 1.18 KB

Versions: 4

Compression:

Stored size: 1.18 KB

Contents

require_relative 'minitest_helper'

describe TrackerApi::Resources::Iteration 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) } }
  let(:iteration) { VCR.use_cassette('get current iteration') { project.iterations(scope: "current").first } }

  describe "#cycle_time_details" do
    it "gets all cycle_time_details for this iteration" do
      VCR.use_cassette('get cycle time details', record: :new_episodes) do
        cycle_time_details = iteration.cycle_time_details

        _(cycle_time_details).wont_be_empty
        cycle_time_detail = cycle_time_details.first
        _(cycle_time_detail).must_be_instance_of TrackerApi::Resources::CycleTimeDetails
      end
    end
  end

  describe "#get_history" do
    it "gets all history for a particular iteration" do
      VCR.use_cassette('get daily history container', record: :new_episodes) do
        daily_history_container = iteration.get_history

        _(daily_history_container).must_be_instance_of TrackerApi::Resources::DailyHistoryContainer
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tracker_api-1.16.0 test/iteration_test.rb
tracker_api-1.15.0 test/iteration_test.rb
tracker_api-1.14.0 test/iteration_test.rb
tracker_api-1.13.0 test/iteration_test.rb