Sha256: f50b771f8c44e5286fb97a9920aedd1b8d20be4b3421fe37b3108a43bc183b15

Contents?: true

Size: 559 Bytes

Versions: 2

Compression:

Stored size: 559 Bytes

Contents

# frozen_string_literal: true

require 'rails_helper'

describe Lcms::Engine::Admin::AssociationPickerController do
  ASSOCIATIONS = %w(content_sources tags grades topics reading_assignment_authors
                    reading_assignment_texts standards).freeze

  let(:user) { create :admin }

  before { sign_in user }

  describe '#index' do
    ASSOCIATIONS.each do |assoc|
      it "list #{assoc} association items" do
        get :index, params: { association: assoc, format: :json }
        expect(response).to be_successful
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lcms-engine-0.3.0 spec/controllers/admin/association_picker_controller_spec.rb
lcms-engine-0.2.0 spec/controllers/admin/association_picker_controller_spec.rb