Skip to content

Commit

Permalink
Merge pull request #367 from dmitry-sinina/1.7.7
Browse files Browse the repository at this point in the history
 refs #362, added 204 to allowed http codes while cdr export file rem…
  • Loading branch information
dmitry-sinina authored Sep 11, 2018
2 parents a60d859 + 6ca6b8b commit 15ebf7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/jobs/worker/remove_cdr_export_file_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def message
end

queue_as 'cdr_export'
ALLOWED_HTTP_CODES = [200, 404].freeze
ALLOWED_HTTP_CODES = [200, 204, 404].freeze

def perform(cdr_export_id)
url = URI.parse(delete_url(cdr_export_id))
Expand Down
8 changes: 8 additions & 0 deletions spec/jobs/worker/remove_cdr_export_file_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@
end
end

context 'when http code 204' do
let(:http_code) do
204
end

include_examples :valid_deleting
end

context 'when http code 200' do
let(:http_code) do
200
Expand Down

0 comments on commit 15ebf7c

Please sign in to comment.