Sha256: c2a88439434e24b225251b5ae1e6ae1bbe63aba9b0020be99dee6fcd4408be83
Contents?: true
Size: 807 Bytes
Versions: 28
Compression:
Stored size: 807 Bytes
Contents
require 'shared_examples/protect_product_actions' require 'spec_helper' module Spree describe Spree::Api::ProductsController do render_views let!(:product) { create(:product) } let(:attributes) { [:id, :name, :description, :price, :available_on, :permalink, :meta_description, :meta_keywords, :taxon_ids] } context "without authentication" do before { Spree::Api::Config[:requires_authentication] = false } it "retreives a list of products" do api_get :index json_response["products"].first.should have_attributes(attributes) json_response["count"].should == 1 json_response["current_page"].should == 1 json_response["pages"].should == 1 end it_behaves_like "modifying product actions are restricted" end end end
Version data entries
28 entries across 28 versions & 1 rubygems