Skip to content

Commit 60ef37d

Browse files
committed
Add status
1 parent 5760c50 commit 60ef37d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/cortex/result.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Cortex
22
class Result
3-
attr_reader :raw_headers, :contents, :total_items, :page, :per_page, :errors, :range_start, :range_end, :range
3+
attr_reader :raw_headers, :contents, :total_items, :page, :per_page, :errors, :range_start, :range_end, :range, :status
44

55
def initialize(body, headers, status)
66
@contents = body

spec/result_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,9 @@
3535
expect(failed.raw_headers).to eq({})
3636
end
3737

38+
it 'should expose the http status' do
39+
expect(result.status).to eq 200
40+
expect(failed.status).to eq 403
41+
end
42+
3843
end

0 commit comments

Comments
 (0)