Mock HTTP requests to Tab
This commit is contained in:
parent
c6ef077f7e
commit
05c83fb5cc
2 changed files with 5 additions and 0 deletions
|
@ -9,6 +9,10 @@
|
|||
#
|
||||
|
||||
describe OrderItem do
|
||||
before(:each) do
|
||||
stub_request(:get, /.*/).to_return(status: 200, body: JSON.dump({ balance: 20 }))
|
||||
end
|
||||
|
||||
it 'has a valid factory' do
|
||||
order_item = create :order_item
|
||||
expect(order_item).to be_valid
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
describe Order do
|
||||
before :each do
|
||||
stub_request(:get, /.*/).to_return(status: 200, body: JSON.dump({ balance: 20 }))
|
||||
@user = create :user
|
||||
@order = create :order, user: @user
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue