Sha256: 89f8080016cdb9132365baafd02189c57e9f1e761a935adad54a689e1ee9d831

Contents?: true

Size: 772 Bytes

Versions: 7

Compression:

Stored size: 772 Bytes

Contents

require_relative 'minitest_helper'

describe TrackerApi::Resources::Release 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 '.stories' do
    it 'returns all the stories related to a release' do
      releases = VCR.use_cassette('get releases') { project.releases }
      release = releases.find { |release| release.name == 'Beta launch' }

      VCR.use_cassette('release stories', record: :new_episodes) do
        stories = release.stories

        _(stories.size).must_equal 9
        _(stories.first).must_be_instance_of TrackerApi::Resources::Story
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
tracker_api-1.16.0 test/release_test.rb
tracker_api-1.15.0 test/release_test.rb
tracker_api-1.14.0 test/release_test.rb
tracker_api-1.13.0 test/release_test.rb
tracker_api-1.12.0 test/release_test.rb
tracker_api-1.11.0 test/release_test.rb
tracker_api-1.10.0 test/release_test.rb