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