|
11 | 11 | response = load_json(DIR_ASYNC, 'post_success.json') |
12 | 12 | parsed_response = Mindee::Parsing::Common::ApiResponse.new(Mindee::Product::InvoiceSplitter::InvoiceSplitterV1, |
13 | 13 | response) |
14 | | - expect(parsed_response.job.status).to eq(Mindee::JobStatus::WAITING) |
| 14 | + expect(parsed_response.job.status).to eq(Mindee::Parsing::Common::JobStatus::WAITING) |
15 | 15 | expect(parsed_response.job.id).to eq('76c90710-3a1b-4b91-8a39-31a6543e347c') |
16 | 16 | expect(parsed_response.job.status).to_not respond_to(:available_at) |
17 | 17 | expect(parsed_response.job.status).to_not respond_to(:millisecs_taken) |
|
26 | 26 | expect(parsed_response.job.id).to be(nil) |
27 | 27 | expect(parsed_response.job.status).to_not respond_to(:available_at) |
28 | 28 | expect(parsed_response.job.status).to_not respond_to(:millisecs_taken) |
29 | | - expect(parsed_response.api_request.status).to eq(Mindee::RequestStatus::FAILURE) |
| 29 | + expect(parsed_response.api_request.status).to eq(Mindee::Parsing::Common::RequestStatus::FAILURE) |
30 | 30 | expect(parsed_response.api_request.error['code']).to eq('Forbidden') |
31 | 31 | end |
32 | 32 |
|
|
35 | 35 | parsed_response = Mindee::Parsing::Common::ApiResponse.new(Mindee::Product::InvoiceSplitter::InvoiceSplitterV1, |
36 | 36 | response) |
37 | 37 | expect(parsed_response.job.issued_at.strftime('%Y-%m-%dT%H:%M:%S.%6N')).to eq('2023-03-16T12:33:49.602947') |
38 | | - expect(parsed_response.job.status).to eq(Mindee::JobStatus::PROCESSING) |
| 38 | + expect(parsed_response.job.status).to eq(Mindee::Parsing::Common::JobStatus::PROCESSING) |
39 | 39 | expect(parsed_response.job.id).to eq('76c90710-3a1b-4b91-8a39-31a6543e347c') |
40 | 40 | expect(parsed_response.job.status).to_not respond_to(:available_at) |
41 | 41 | expect(parsed_response.job.status).to_not respond_to(:millisecs_taken) |
|
47 | 47 | parsed_response = Mindee::Parsing::Common::ApiResponse.new(Mindee::Product::InvoiceSplitter::InvoiceSplitterV1, |
48 | 48 | response) |
49 | 49 | expect(parsed_response.job.issued_at.strftime('%Y-%m-%dT%H:%M:%S.%6N')).to eq('2023-03-21T13:52:56.326107') |
50 | | - expect(parsed_response.job.status).to eq(Mindee::JobStatus::COMPLETED) |
| 50 | + expect(parsed_response.job.status).to eq(Mindee::Parsing::Common::JobStatus::COMPLETED) |
51 | 51 | expect(parsed_response.job.id).to eq('b6caf9e8-9bcc-4412-bcb7-f5b416678f0d') |
52 | 52 | expect(parsed_response.job.available_at.strftime('%Y-%m-%dT%H:%M:%S.%6N')).to eq('2023-03-21T13:53:00.990339') |
53 | 53 | expect(parsed_response.job.millisecs_taken).to eq(4664) |
|
0 commit comments