Skip to content

Commit

Permalink
Fixes for cop.
Browse files Browse the repository at this point in the history
  • Loading branch information
marlinpierce committed Jan 13, 2025
1 parent 38dc22b commit 191dc64
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/jira/resource/attachment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
subject(:attachment) do
described_class.new(
client,
issue: JIRA::Resource::Issue.new(client, attrs: {'id' => issue_id}),
issue: JIRA::Resource::Issue.new(client, attrs: { 'id' => issue_id }),
attrs: { 'author' => { 'foo' => 'bar' }, 'id' => attachment_id }
)
end

Check failure on line 10 in spec/jira/resource/attachment_spec.rb

View workflow job for this annotation

GitHub Actions / rubocop

RSpec/EmptyLineAfterSubject: Add an empty line after `subject`.
Expand Down Expand Up @@ -74,7 +74,7 @@
end
let(:attachment_file_contents) { 'file contents' }
let(:issue_id) { 3232 }
let(:issue) { JIRA::Resource::Issue.new(client, attrs: {'id' => issue_id}) }
let(:issue) { JIRA::Resource::Issue.new(client, attrs: { 'id' => issue_id }) }

before do
stub_request(:get, attachment_url).to_return(body: attachment_file_contents)
Expand Down Expand Up @@ -117,7 +117,7 @@
].to_json
)
end
let(:issue) { JIRA::Resource::Issue.new(client, attrs: {'id' => issue_id}) }
let(:issue) { JIRA::Resource::Issue.new(client, attrs: { 'id' => issue_id }) }

describe '#save' do
subject { attachment.save('file' => path_to_file) }
Expand Down Expand Up @@ -232,7 +232,6 @@

context 'an attachment is on an issue' do
describe '#delete' do

it 'removes the attachment' do
expect(client).to receive(:delete).with("/jira/rest/api/2/issue/#{issue_id}/attachments/#{attachment_id}")

Expand Down

0 comments on commit 191dc64

Please sign in to comment.