Make enterprises_controller_spec use api_post instead of spree_post

This commit is contained in:
Luis Ramos
2020-06-02 16:16:07 +01:00
parent 8bb4310cba
commit c68459f212

View File

@@ -23,14 +23,14 @@ module Api
address1: '123 Abc Street',
city: 'Northcote',
zipcode: '3070',
state_id: australia.states.first,
state_id: australia.states.first.id,
country_id: australia.id
}
}
end
it "creates as sells=any when it is not a producer" do
spree_post :create, { enterprise: new_enterprise_params }
api_post :create, { enterprise: new_enterprise_params }
expect(response).to be_success
enterprise = Enterprise.last