Sha256: 602cb17152f2a5e5f5a6482966d973f6f2d069602578b1e60d67326d4588bc43
Contents?: true
Size: 614 Bytes
Versions: 6
Compression:
Stored size: 614 Bytes
Contents
require 'spec_helper' 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
6 entries across 6 versions & 1 rubygems