mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
6e161d3e75
The most common thing that we do with fab! is: fab!(:thing) { Fabricate(:thing) } This commit adds a shorthand for this which is just simply: fab!(:thing) i.e. If you omit the block, then, by default, you'll get a `Fabricate`d object using the fabricator of the same name.
26 lines
782 B
Ruby
26 lines
782 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe "Admin Site Setting Search", type: :system do
|
|
let(:settings_page) { PageObjects::Pages::AdminSettings.new }
|
|
fab!(:admin)
|
|
|
|
before do
|
|
SiteSetting.title = "Discourse"
|
|
sign_in(admin)
|
|
end
|
|
|
|
describe "when searching for keywords" do
|
|
it "finds the associated site setting" do
|
|
settings_page.visit
|
|
settings_page.type_in_search("anonymous_posting_min_trust_level")
|
|
expect(settings_page).to have_search_result("anonymous_posting_allowed_groups")
|
|
end
|
|
|
|
it "can search for previous site setting without underscores" do
|
|
settings_page.visit
|
|
settings_page.type_in_search("anonymous posting min")
|
|
expect(settings_page).to have_search_result("anonymous_posting_allowed_groups")
|
|
end
|
|
end
|
|
end
|