Sha256: 25ff9f3f71e8077b6095cc027cd8f545f33b8dec943de6d9c7286b815c757217

Contents?: true

Size: 759 Bytes

Versions: 33

Compression:

Stored size: 759 Bytes

Contents

require 'spec_helper'

describe Maestrano::DependanciesController, type: :controller do
  routes { Maestrano::Connector::Rails::Engine.routes }

  describe 'index' do
    subject { get :index }

    context 'without authentication' do
      before {
        controller.class.before_filter :authenticate_maestrano!
      }

      it 'respond with unauthorized' do
        subject
        expect(response.status).to eq(401)
      end
    end

    context 'with authentication' do
      before {
        controller.class.skip_before_filter :authenticate_maestrano!
      }

      it 'renders the dependancies hash' do
        subject
        expect(response.body).to eql(Maestrano::Connector::Rails::ConnecHelper.dependancies.to_json)
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.0.2.pre.RC6 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.2.pre.RC5 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.2.pre.RC4 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.2.pre.RC3 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.2.pre.RC2 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.2.pre.RC1 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.1 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC13 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC12 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC11 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC10 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC9 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC8 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-1.5.0 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC7 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC6 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC5 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC4 spec/controllers/dependancies_controller_spec.rb
maestrano-connector-rails-2.0.0.pre.RC3 spec/controllers/dependancies_controller_spec.rb