We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Airborne, how can I use GET to return values from test environment?
For example, I have the following test:
it 'should foo the bar' do product = FactoryGirl.create(:product) get "/v1/products" pp product pp body expect_status 200 end
The output of product is:
product
#<Product:0x007f9dfe601078 id: 847, ref: "038-71-8140174268593", name: "Adipisci Sqryujdcoefpthnzbvagwlxikm", description: "Lorem ipsum...", created_at: Tue, 01 Nov 2016 15:48:25 UTC +00:00, updated_at: Tue, 01 Nov 2016 15:48:25 UTC +00:00>
But the output of body is:
"{\"data\":[]}"
I have rails server running test environment with rails s -e test
rails s -e test
If I run rails server with development environment, the body returns all products from dev environment with no problems.
body
The text was updated successfully, but these errors were encountered:
I was running the test with RSpec.describe ProductResource, type: :resource do instead of RSpec.describe 'Products', type: :request do.
RSpec.describe ProductResource, type: :resource do
RSpec.describe 'Products', type: :request do
Sorry, something went wrong.
No branches or pull requests
Using Airborne, how can I use GET to return values from test environment?
For example, I have the following test:
The output of
product
is:But the output of body is:
"{\"data\":[]}"
I have rails server running test environment with
rails s -e test
If I run rails server with development environment, the
body
returns all products from dev environment with no problems.The text was updated successfully, but these errors were encountered: