Sha256: 6f276f1cbb118f73f9ae86e20c76b90d8801833185e059b60f1f4d2989b8baa0
Contents?: true
Size: 883 Bytes
Versions: 1
Compression:
Stored size: 883 Bytes
Contents
require_relative 'minitest_helper' describe TrackerApi::Resources::FileAttachment 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(:story_id) { '66728004' } let(:story) { VCR.use_cassette('get story') { project.story(story_id) } } it 'can be deleted' do VCR.use_cassette('delete an attachment', record: :new_episodes) do comment_with_attachments = story.create_comment(text: "test comment", files: [File.expand_path('../Gemfile', File.dirname(__FILE__))]) comment_with_attachments.attachments(reload: true).size.must_equal 1 comment_with_attachments.attachments.first.delete comment_with_attachments.attachments(reload: true).size.must_equal 1 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tracker_api-1.8.0 | test/file_attachment_test.rb |