Sha256: 06ea118bda9f72e1bdffa57b510c1f9486892e4f59a0c4b08e0d42391902533a
Contents?: true
Size: 782 Bytes
Versions: 25
Compression:
Stored size: 782 Bytes
Contents
require 'spec_helper' describe CurationConcerns::OperationsController do routes { CurationConcerns::Engine.routes } let(:parent) { create(:operation, :pending, user: user) } let!(:child1) { create(:operation, :failing, parent: parent, user: user) } let!(:child2) { create(:operation, :pending, parent: parent, user: user) } let(:user) { create(:user) } before do sign_in user end describe "#index" do it "is successful" do get :index, user_id: user expect(response).to be_successful expect(assigns[:operations]).to eq [parent] end end describe "#show" do it "is successful" do get :show, user_id: user, id: parent expect(response).to be_successful expect(assigns[:operation]).to eq parent end end end
Version data entries
25 entries across 25 versions & 1 rubygems