docbrown/spec/system/internal/admin_manages_organizations_spec.rb
Jacob Herrington d98f8237bd Add view for managing organizations (#5149) [deploy]
* Add view for managing organizations

This adds only an index and show action for the internal/organizations
page. Eventually we'll flesh this out with features to automate the more
mechanical org management tasks.

* Use instance variable for search query

* Convert multiple expects into one

* Add pagination to organizations

* Add search spec for organizations

* Use size over count
2019-12-17 12:07:11 -05:00

18 lines
461 B
Ruby

require "rails_helper"
RSpec.describe "Admin manages organizations", type: :system do
let(:admin) { create(:user, :super_admin) }
let(:organization) { create(:organization) }
before do
create_list :organization, 5
sign_in admin
visit "/internal/organizations"
end
it "searches for organizations" do
fill_in "search", with: organization.name.to_s
click_on "Search"
expect(page.body).to have_link(organization.name)
end
end