File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change 1
1
RSpec . describe CirroIO ::Client ::Payout do
2
2
let ( :app_worker ) { CirroIO ::Client ::AppWorker . load id : 1 }
3
-
4
- let :request_headers do
5
- {
6
- 'Accept' => 'application/vnd.api+json' ,
7
- 'Accept-Encoding' => 'gzip,deflate' ,
8
- 'Content-Type' => 'application/vnd.api+json' ,
9
- 'User-Agent' => 'Faraday v1.1.0' ,
10
- 'Authorization' => 'Bearer jwt-token' ,
11
- }
12
- end
13
-
14
3
let :response_headers do
15
4
{
16
5
'Content-Type' => 'application/json' ,
19
8
20
9
before do
21
10
configure_api_client
22
- allow ( JWT ) . to receive ( :encode ) . and_return ( 'jwt-token' )
23
11
end
24
12
25
13
describe '.create' do
35
23
end
36
24
37
25
before do
38
- stub_request ( :post , request_url )
39
- . with ( headers : request_headers )
40
- . to_return ( body : File . read ( './spec/fixtures/payout.json' ) , headers : response_headers )
26
+ stub_request ( :post , request_url ) . to_return ( body : File . read ( './spec/fixtures/payout.json' ) , headers : response_headers )
41
27
end
42
28
43
29
it 'creates a payout for the app worker' do
52
38
} ,
53
39
} ,
54
40
} ,
55
- attributes : attributes
56
- }
41
+ attributes : attributes ,
42
+ } ,
57
43
}
58
44
59
45
expect ( payout ) . to be_persisted
You can’t perform that action at this time.
0 commit comments