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

Version Path
curation_concerns-1.4.0 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.3.3 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.3.2 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.3.1 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.3.0 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.2.0 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.1.2 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.1.1 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.1.0 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta10 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta9 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta8 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta7 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta6 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta5 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta4 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta3 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta2 spec/controllers/curation_concerns/operations_controller_spec.rb
curation_concerns-1.0.0.beta1 spec/controllers/curation_concerns/operations_controller_spec.rb