Sha256: fabf561bda69e2106257fd01151f1854a3f92c8dcfdb554f13f00a24ff9f91f6

Contents?: true

Size: 719 Bytes

Versions: 6

Compression:

Stored size: 719 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

RSpec.describe PaidUp::PlansController do
  include_context 'loaded site'
  routes { PaidUp::Engine.routes }

  describe 'GET #index' do
    before do
      get :index
    end
    context 'responds successfully with an HTTP 200 status code' do
      subject { response }
      it { should be_success }
      it { should have_http_status(200) }
    end
    context 'renders the index template' do
      subject { response }
      it { should render_template('index') }
    end
    context 'loads all of the plans into @plans' do
      subject { assigns(:plans) }
      it { should eq(PaidUp::Plan.subscribable) }
      it { should have(4).items }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
paid_up-0.13.3 spec/controllers/paid_up/plans_spec.rb
paid_up-0.13.2 spec/controllers/paid_up/plans_spec.rb
paid_up-0.13.1 spec/controllers/paid_up/plans_spec.rb
paid_up-0.13.0 spec/controllers/paid_up/plans_spec.rb
paid_up-0.12.4 spec/controllers/paid_up/plans_spec.rb
paid_up-0.12.3 spec/controllers/paid_up/plans_spec.rb