Sha256: 35a44ad16c7b21a423a7d908205cb97e5cd8cef2f383fef9ee5a3a66744e34ea

Contents?: true

Size: 750 Bytes

Versions: 5

Compression:

Stored size: 750 Bytes

Contents

require_relative 'minitest_helper'

describe TrackerApi::Resources::Review do
  let(:pt_user) { PT_USER_1 }
  let(:client) { TrackerApi::Client.new token: pt_user[:token] }
  let(:story) do
    TrackerApi::Resources::Story.new(
      client: client,
      project_id: pt_user[:project_id],
      id: '66728004'
    )
  end
  let(:reviews) { VCR.use_cassette('get story reviews') { story.reviews } }
  let(:existing_review) { reviews.first }

  it 'can update an existing review' do
    new_state = 'pass'
    existing_review.status = new_state

    VCR.use_cassette('save review', record: :new_episodes) do
      existing_review.save
    end

    _(existing_review.status).must_equal new_state
    _(existing_review.clean?).must_equal true
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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