Sha256: 08dba1c7a2a727ddd6d853978f9b797f72b1ea8a99d45554a7b5c0c1fd725e5f
Contents?: true
Size: 688 Bytes
Versions: 5
Compression:
Stored size: 688 Bytes
Contents
require 'spec_helper' describe Spree::Admin::PromotionCodesController do stub_authorization! render_views let!(:promotion) { create(:promotion) } let!(:code1) { create(:promotion_code, promotion: promotion) } let!(:code2) { create(:promotion_code, promotion: promotion) } let!(:code3) { create(:promotion_code, promotion: promotion) } it "can create a promotion rule of a valid type" do get :index, promotion_id: promotion.id, format: 'csv' expect(response).to be_success parsed = CSV.parse(response.body, headers: true) expect(parsed.entries.map(&:to_h)).to eq([{ "Code" => code1.value }, { "Code" => code2.value }, { "Code" => code3.value }]) end end
Version data entries
5 entries across 5 versions & 1 rubygems