Sha256: 36b2f3f9b48c2b3def48b72e4ca23d9fd08de427b7c6819ddac1148496c7492e
Contents?: true
Size: 973 Bytes
Versions: 4
Compression:
Stored size: 973 Bytes
Contents
# frozen_string_literal: true describe Stenographer::AdminController, type: :controller do routes { Stenographer::Engine.routes } describe '#index' do def index_action(opts = {}) get :index, params: {}.merge(opts) end describe 'individual behaviors' do let(:change) { create(:change) } let(:link) { create(:link) } let(:authentication) { create(:authentication) } before do index_action end it 'assigns @change_count' do expect(assigns(:change_count)).to eq(Stenographer::Change.count) end it 'assigns @authentication_count' do expect(assigns(:authentication_count)).to eq(Stenographer::Authentication.count) end it 'assigns @link_count' do expect(assigns(:link_count)).to eq(Stenographer::Link.count) end it 'renders the index page' do index_action expect(response).to render_template(:index) end end end end
Version data entries
4 entries across 4 versions & 1 rubygems