2021-06-07 12:34:01 -05:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-07-27 21:27:38 -05:00
|
|
|
RSpec.describe DirectoryColumnsController do
|
2023-11-09 16:47:59 -06:00
|
|
|
fab!(:user)
|
|
|
|
fab!(:admin)
|
2021-06-07 12:34:01 -05:00
|
|
|
|
|
|
|
describe "#index" do
|
2021-06-22 13:00:04 -05:00
|
|
|
it "returns all active directory columns" do
|
|
|
|
likes_given = DirectoryColumn.find_by(name: "likes_given")
|
|
|
|
likes_given.update(enabled: false)
|
|
|
|
|
|
|
|
get "/directory-columns.json"
|
|
|
|
|
|
|
|
expect(response.parsed_body["directory_columns"].map { |dc| dc["name"] }).not_to include(
|
|
|
|
"likes_given",
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|
2021-06-07 12:34:01 -05:00
|
|
|
end
|