Sha256: 5fa3411c7c83974982de853bef38e0dedac6df4a8b06c0e33a837fd994580e60
Contents?: true
Size: 600 Bytes
Versions: 8
Compression:
Stored size: 600 Bytes
Contents
describe Hyrax::FeaturedWorkListsController, type: :controller do describe "#create" do before do expect(controller).to receive(:authorize!).with(:update, FeaturedWork) end let(:feature1) { FactoryGirl.create(:featured_work) } let(:feature2) { FactoryGirl.create(:featured_work) } it "is successful" do post :create, params: { format: :json, featured_work_list: { featured_works_attributes: [{ id: feature1.id, order: "2" }, { id: feature2.id, order: "1" }] } } expect(feature1.reload.order).to eq 2 end end end
Version data entries
8 entries across 8 versions & 2 rubygems