Sha256: d766ce339e486323af1da59758b9f7f3679eb5eca85d28a494e4d82fe1332291

Contents?: true

Size: 664 Bytes

Versions: 40

Compression:

Stored size: 664 Bytes

Contents

require 'spec_helper'

describe SynchronizationsController, :type => :controller do
  describe 'index' do
    subject { get :index }

    it { expect(subject).to be_success }

    context 'when user is logged in' do
      let(:organization) {  create(:organization) }
      let(:synchronization) { create(:synchronization, organization: organization) }
      before {
        allow_any_instance_of(Maestrano::Connector::Rails::SessionHelper).to receive(:current_organization).and_return(organization)
      }

      it 'assigns the synchronizations' do
        subject
        expect(assigns(:synchronizations)).to eq([synchronization])
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
maestrano-connector-rails-1.3.4 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.3.3 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.3.2 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.3.1 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.3.0 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.2.3 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.2.2 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.2.1 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.2.0 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.1.2 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.1.1 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.1.0 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.0.4 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.0.3 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.0.2 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.0.1 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-1.0.0 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-0.4.4 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-0.4.3 lib/generators/connector/templates/synchronizations_controller_spec.rb
maestrano-connector-rails-0.4.2 lib/generators/connector/templates/synchronizations_controller_spec.rb