Sha256: 7ee78dda92c6a09d3e5b18cffe99b5a2b5b2cdb077d8e158f8d61d56c45efbe7

Contents?: true

Size: 772 Bytes

Versions: 1

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

1 entries across 1 versions & 1 rubygems

Version Path
tracker_api-1.9.1 test/release_test.rb