Sha256: d495236894296382447507bb7ce53a151b8d8c1a306b35942a4808d277bb69b1
Contents?: true
Size: 591 Bytes
Versions: 8
Compression:
Stored size: 591 Bytes
Contents
describe 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, 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 & 1 rubygems