remove denormalization of lists and orders towards the section

This commit is contained in:
2015-10-12 15:25:58 +02:00
parent a6c74f1872
commit 86e518890f
5 changed files with 22 additions and 27 deletions
+5 -7
View File
@@ -4,15 +4,13 @@ describe "User lists", type: :request do
let(:supplier){ create :supplier }
let(:user){ create :user}
before do
supplier.add_employee(employee)
login_as employee, scope: :employee
#supplier.add_employee(employee)
#login_as employee, scope: :employee
end
it "works" do
supplier = create :supplier
get "/supplier/suppliers/#{supplier.id}.json"
api_response.data.relationships.product_categorie
included_section = api_response.included.find{|ih| ih['type'] == 'sections'}
included_section['relationships']['tables']['data'].should eq []
included_section['relationships']['section-areas']['data'].should eq []
get current_users_lists_path, auth_token: user.authentication_token
expect( api_response ).to eq Hash.new
response.status.should eq 404
end
end