docbrown/spec/system/admin/admin_manages_organizations_spec.rb
Josh Puetz 1c566e0ec4
[deploy] Move /internal to `/admin (#9639)
* First draft - all the big changes

* Changing some more references to 'internal'

* Relocate internal request tests to admin

* Relocate internal system tests to admin

* Fix trailing space

* Test fix

* Move queries from internal to admin

* Docs updates

* Rename internal stimuls controllers to admin (plus docs)

* Rename admin layout

* Fix routing after rebase

* Fixes for latest added admin interfaces

* Serviceworker ignore paths
2020-08-07 10:36:26 -04:00

29 lines
841 B
Ruby

require "rails_helper"
RSpec.describe "Admin manages organizations", type: :system do
let(:admin) { create(:user, :super_admin) }
let(:organization) { create(:organization) }
before { sign_in admin }
context "when searching for organizations" do
it "searches for organizations" do
create_list :organization, 5
visit admin_organizations_path
fill_in "search", with: organization.name.to_s
click_on "Search"
expect(page.body).to have_link(organization.name)
end
end
context "when managing credits for a single organization" do
before { visit admin_organization_path(organization) }
it "does not show the remove form when there are no credits" do
expect(page).to have_button("Add Org Credits")
# expect(page).to have_no_button("Remove Org Credits")
end
end
end