DEV: Fix random typos (#22078)
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
This commit is contained in:
parent
286dfcacb4
commit
dae3970bad
|
@ -24,7 +24,7 @@ RSpec.describe FormTemplate, type: :model do
|
||||||
expect(t.save).to eq(false)
|
expect(t.save).to eq(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "must have a type propety" do
|
it "must have a type property" do
|
||||||
template = "- hello: world"
|
template = "- hello: world"
|
||||||
t = Fabricate.build(:form_template, name: "Basic Template", template: template)
|
t = Fabricate.build(:form_template, name: "Basic Template", template: template)
|
||||||
expect(t.save).to eq(false)
|
expect(t.save).to eq(false)
|
||||||
|
|
|
@ -222,7 +222,7 @@ RSpec.describe ScreenedIpAddress do
|
||||||
expect(screened_ip_address.reload.match_count).to eq(0)
|
expect(screened_ip_address.reload.match_count).to eq(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns false if a more specific recrord matches and action is :do_nothing" do
|
it "returns false if a more specific record matches and action is :do_nothing" do
|
||||||
Fabricate(
|
Fabricate(
|
||||||
:screened_ip_address,
|
:screened_ip_address,
|
||||||
ip_address: "111.234.23.0/24",
|
ip_address: "111.234.23.0/24",
|
||||||
|
|
|
@ -85,7 +85,7 @@ RSpec.describe Sitemap do
|
||||||
expect(sitemap.topics).to be_empty
|
expect(sitemap.topics).to be_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns all the neccessary topic attributes to render a sitemap URL" do
|
it "returns all the necessary topic attributes to render a sitemap URL" do
|
||||||
topic = Fabricate(:topic)
|
topic = Fabricate(:topic)
|
||||||
|
|
||||||
topics_data = sitemap.topics.first
|
topics_data = sitemap.topics.first
|
||||||
|
|
|
@ -183,8 +183,8 @@ RSpec.describe TopicConverter do
|
||||||
|
|
||||||
it "invites only users with regular posts" do
|
it "invites only users with regular posts" do
|
||||||
post2 = Fabricate(:post, topic: topic)
|
post2 = Fabricate(:post, topic: topic)
|
||||||
whipser_post = Fabricate(:post, topic: topic, post_type: Post.types[:whisper])
|
Fabricate(:post, topic: topic, post_type: Post.types[:whisper])
|
||||||
small_action_post = Fabricate(:post, topic: topic, post_type: Post.types[:small_action])
|
Fabricate(:post, topic: topic, post_type: Post.types[:small_action])
|
||||||
|
|
||||||
topic.convert_to_private_message(admin)
|
topic.convert_to_private_message(admin)
|
||||||
|
|
||||||
|
|
|
@ -3097,7 +3097,7 @@ RSpec.describe Topic do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "removing oneself" do
|
describe "removing oneself" do
|
||||||
it "should remove onself" do
|
it "should remove oneself" do
|
||||||
topic.allowed_users << user1
|
topic.allowed_users << user1
|
||||||
|
|
||||||
expect(topic.remove_allowed_user(user1, user1)).to eq(true)
|
expect(topic.remove_allowed_user(user1, user1)).to eq(true)
|
||||||
|
|
|
@ -20,7 +20,7 @@ RSpec.describe "TopicThumbnail" do
|
||||||
expect(topic.topic_thumbnails.length).to eq(1)
|
expect(topic.topic_thumbnails.length).to eq(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not enque job if original image is too large" do
|
it "does not enqueue job if original image is too large" do
|
||||||
upload2.filesize = SiteSetting.max_image_size_kb.kilobytes + 1
|
upload2.filesize = SiteSetting.max_image_size_kb.kilobytes + 1
|
||||||
SiteSetting.create_thumbnails = true
|
SiteSetting.create_thumbnails = true
|
||||||
topic2.generate_thumbnails!(extra_sizes: nil)
|
topic2.generate_thumbnails!(extra_sizes: nil)
|
||||||
|
@ -32,7 +32,7 @@ RSpec.describe "TopicThumbnail" do
|
||||||
expect(Jobs::GenerateTopicThumbnails.jobs.size).to eq(0)
|
expect(Jobs::GenerateTopicThumbnails.jobs.size).to eq(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not enque job if image_upload width is nil" do
|
it "does not enqueue job if image_upload width is nil" do
|
||||||
SiteSetting.create_thumbnails = true
|
SiteSetting.create_thumbnails = true
|
||||||
topic3.image_url(enqueue_if_missing: true)
|
topic3.image_url(enqueue_if_missing: true)
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ RSpec.describe UploadReference do
|
||||||
describe "theme field uploads" do
|
describe "theme field uploads" do
|
||||||
fab!(:upload) { Fabricate(:upload) }
|
fab!(:upload) { Fabricate(:upload) }
|
||||||
|
|
||||||
it "creates upload refererences" do
|
it "creates upload references" do
|
||||||
theme_field = nil
|
theme_field = nil
|
||||||
expect do
|
expect do
|
||||||
theme_field =
|
theme_field =
|
||||||
|
@ -152,7 +152,7 @@ RSpec.describe UploadReference do
|
||||||
describe "theme setting uploads" do
|
describe "theme setting uploads" do
|
||||||
fab!(:upload) { Fabricate(:upload) }
|
fab!(:upload) { Fabricate(:upload) }
|
||||||
|
|
||||||
it "creates upload refererences" do
|
it "creates upload references" do
|
||||||
theme_setting = nil
|
theme_setting = nil
|
||||||
expect do
|
expect do
|
||||||
theme_setting =
|
theme_setting =
|
||||||
|
|
|
@ -202,7 +202,7 @@ RSpec.describe "Multisite s3 uploads", type: :multisite do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "secure uploadss" do
|
describe "secure uploads" do
|
||||||
let(:store) { FileStore::S3Store.new }
|
let(:store) { FileStore::S3Store.new }
|
||||||
let(:client) { Aws::S3::Client.new(stub_responses: true) }
|
let(:client) { Aws::S3::Client.new(stub_responses: true) }
|
||||||
let(:resource) { Aws::S3::Resource.new(client: client) }
|
let(:resource) { Aws::S3::Resource.new(client: client) }
|
||||||
|
@ -401,7 +401,7 @@ RSpec.describe "Multisite s3 uploads", type: :multisite do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "presigned url contans the metadata when provided" do
|
it "presigned url contains the metadata when provided" do
|
||||||
url =
|
url =
|
||||||
store.signed_url_for_temporary_upload("test.png", metadata: { "test-meta": "testing" })
|
store.signed_url_for_temporary_upload("test.png", metadata: { "test-meta": "testing" })
|
||||||
expect(url).to include("&x-amz-meta-test-meta=testing")
|
expect(url).to include("&x-amz-meta-test-meta=testing")
|
||||||
|
|
|
@ -595,7 +595,7 @@ RSpec.describe Admin::BackupsController do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "works with multiple chunks when the final chunk is just the remaninder" do
|
it "works with multiple chunks when the final chunk is just the remainder" do
|
||||||
freeze_time
|
freeze_time
|
||||||
described_class.any_instance.expects(:has_enough_space_on_disk?).times(3).returns(true)
|
described_class.any_instance.expects(:has_enough_space_on_disk?).times(3).returns(true)
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ RSpec.describe Admin::FormTemplatesController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "when experiemental form templates is disabled" do
|
context "when experimental form templates is disabled" do
|
||||||
before do
|
before do
|
||||||
sign_in(admin)
|
sign_in(admin)
|
||||||
SiteSetting.experimental_form_templates = false
|
SiteSetting.experimental_form_templates = false
|
||||||
|
|
|
@ -76,7 +76,7 @@ RSpec.describe Admin::GroupsController do
|
||||||
context "with Group.plugin_permitted_params" do
|
context "with Group.plugin_permitted_params" do
|
||||||
after { DiscoursePluginRegistry.reset! }
|
after { DiscoursePluginRegistry.reset! }
|
||||||
|
|
||||||
it "filter unpermitted params" do
|
it "filter non-permitted params" do
|
||||||
params = group_params
|
params = group_params
|
||||||
params[:group].merge!(allow_unknown_sender_topic_replies: true)
|
params[:group].merge!(allow_unknown_sender_topic_replies: true)
|
||||||
|
|
||||||
|
@ -448,7 +448,7 @@ RSpec.describe Admin::GroupsController do
|
||||||
expect(response.parsed_body["user_count"]).to eq(2)
|
expect(response.parsed_body["user_count"]).to eq(2)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "doesn't responde with 500 if domain is invalid" do
|
it "doesn't respond with 500 if domain is invalid" do
|
||||||
group = Fabricate(:group)
|
group = Fabricate(:group)
|
||||||
|
|
||||||
put "/admin/groups/automatic_membership_count.json",
|
put "/admin/groups/automatic_membership_count.json",
|
||||||
|
|
|
@ -331,7 +331,7 @@ RSpec.describe Admin::SiteSettingsController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "enqueus the backfilling job if update_existing_user param is present when updating default sidebar tags" do
|
it "enqueues the backfilling job if update_existing_user param is present when updating default sidebar tags" do
|
||||||
SiteSetting.default_sidebar_tags = "tag3"
|
SiteSetting.default_sidebar_tags = "tag3"
|
||||||
|
|
||||||
expect_enqueued_with(
|
expect_enqueued_with(
|
||||||
|
@ -352,7 +352,7 @@ RSpec.describe Admin::SiteSettingsController do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it "enqueus the backfilling job if update_existing_user param is present when updating default sidebar categories" do
|
it "enqueues the backfilling job if update_existing_user param is present when updating default sidebar categories" do
|
||||||
SiteSetting.default_sidebar_categories = "3|4"
|
SiteSetting.default_sidebar_categories = "3|4"
|
||||||
|
|
||||||
expect_enqueued_with(
|
expect_enqueued_with(
|
||||||
|
@ -607,7 +607,7 @@ RSpec.describe Admin::SiteSettingsController do
|
||||||
expect(response.status).to eq(200)
|
expect(response.status).to eq(200)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "does not allow changing of unconfigurable settings" do
|
it "does not allow changing of non-configurable settings" do
|
||||||
SiteSetting::SAMPLE_TEST_PLUGIN.stubs(:configurable?).returns(false)
|
SiteSetting::SAMPLE_TEST_PLUGIN.stubs(:configurable?).returns(false)
|
||||||
|
|
||||||
put "/admin/site_settings/plugin_setting.json", params: { plugin_setting: "not allowed" }
|
put "/admin/site_settings/plugin_setting.json", params: { plugin_setting: "not allowed" }
|
||||||
|
|
|
@ -236,7 +236,7 @@ RSpec.describe Admin::ThemesController do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "fails to import with a failing status" do
|
it "fails to import with a failing status" do
|
||||||
post "/admin/themes/import.json", params: { remote: "non-existant" }
|
post "/admin/themes/import.json", params: { remote: "non-existent" }
|
||||||
|
|
||||||
expect(response.status).to eq(422)
|
expect(response.status).to eq(422)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1430,7 +1430,7 @@ RSpec.describe Admin::UsersController do
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples "user log out not allowed" do
|
shared_examples "user log out not allowed" do
|
||||||
it "prevents loging out of user with a 404 response" do
|
it "prevents logging out of user with a 404 response" do
|
||||||
post "/admin/users/#{reg_user.id}/log_out.json"
|
post "/admin/users/#{reg_user.id}/log_out.json"
|
||||||
|
|
||||||
expect(response.status).to eq(404)
|
expect(response.status).to eq(404)
|
||||||
|
|
|
@ -46,7 +46,7 @@ describe "Composer Form Templates", type: :system do
|
||||||
Fabricate(
|
Fabricate(
|
||||||
:category,
|
:category,
|
||||||
name: "Multiple",
|
name: "Multiple",
|
||||||
slug: "mulitple",
|
slug: "multiple",
|
||||||
topic_count: 10,
|
topic_count: 10,
|
||||||
form_template_ids: [form_template_1.id, form_template_2.id],
|
form_template_ids: [form_template_1.id, form_template_2.id],
|
||||||
)
|
)
|
||||||
|
@ -111,7 +111,7 @@ describe "Composer Form Templates", type: :system do
|
||||||
expect(composer).to have_composer_preview_toggle
|
expect(composer).to have_composer_preview_toggle
|
||||||
end
|
end
|
||||||
|
|
||||||
it "hides the preivew when a category with a form template is selected" do
|
it "hides the preview when a category with a form template is selected" do
|
||||||
category_page.visit(category_with_template_1)
|
category_page.visit(category_with_template_1)
|
||||||
category_page.new_topic_button.click
|
category_page.new_topic_button.click
|
||||||
expect(composer).to have_no_composer_preview
|
expect(composer).to have_no_composer_preview
|
||||||
|
|
|
@ -4,7 +4,6 @@ describe "Composer using review_media", type: :system do
|
||||||
fab!(:user) { Fabricate(:user) }
|
fab!(:user) { Fabricate(:user) }
|
||||||
fab!(:topic) { Fabricate(:topic, category: Category.find(SiteSetting.uncategorized_category_id)) }
|
fab!(:topic) { Fabricate(:topic, category: Category.find(SiteSetting.uncategorized_category_id)) }
|
||||||
fab!(:post) { Fabricate(:post, topic: topic) }
|
fab!(:post) { Fabricate(:post, topic: topic) }
|
||||||
# fab!(:upload) { Fabricate(:upload) }
|
|
||||||
let(:topic_page) { PageObjects::Pages::Topic.new }
|
let(:topic_page) { PageObjects::Pages::Topic.new }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
|
|
@ -86,7 +86,7 @@ describe "Navigating with breadcrumbs", type: :system do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "initial pageloads for nosubcategories" do
|
describe "initial page loads for no-subcategories" do
|
||||||
it "shows correct data for /c/" do
|
it "shows correct data for /c/" do
|
||||||
visit("/c/#{category3.id}")
|
visit("/c/#{category3.id}")
|
||||||
expect(page).to have_current_path("/c/#{category3.slug}/#{category3.id}/none")
|
expect(page).to have_current_path("/c/#{category3.slug}/#{category3.id}/none")
|
||||||
|
|
|
@ -27,7 +27,7 @@ describe "Tag synonyms", type: :system do
|
||||||
tags_page.visit_tag(tag_1)
|
tags_page.visit_tag(tag_1)
|
||||||
tags_page.tag_info_btn.click
|
tags_page.tag_info_btn.click
|
||||||
tags_page.edit_synonyms_btn.click
|
tags_page.edit_synonyms_btn.click
|
||||||
# searched tag doesnt exist but will show option to create tag
|
# searched tag doesn't exist but will show option to create tag
|
||||||
tags_page.search_tags("graphics")
|
tags_page.search_tags("graphics")
|
||||||
tags_page.select_tag(value: "graphics")
|
tags_page.select_tag(value: "graphics")
|
||||||
tags_page.add_synonym_btn.click
|
tags_page.add_synonym_btn.click
|
||||||
|
|
|
@ -34,7 +34,7 @@ describe "Viewing sidebar mobile", type: :system, mobile: true do
|
||||||
expect(sidebar_dropdown).to be_hidden
|
expect(sidebar_dropdown).to be_hidden
|
||||||
end
|
end
|
||||||
|
|
||||||
it "collpases the sidebar when clicking on a link in the sidebar" do
|
it "collapses the sidebar when clicking on a link in the sidebar" do
|
||||||
visit("/latest")
|
visit("/latest")
|
||||||
|
|
||||||
sidebar_dropdown.click
|
sidebar_dropdown.click
|
||||||
|
|
|
@ -18,7 +18,7 @@ RSpec.describe "list/list.erb" do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "adds sturctured data" do
|
it "adds structured data" do
|
||||||
view.stubs(:include_crawler_content?).returns(true)
|
view.stubs(:include_crawler_content?).returns(true)
|
||||||
topic.posters = []
|
topic.posters = []
|
||||||
assign(:list, OpenStruct.new(topics: [topic]))
|
assign(:list, OpenStruct.new(topics: [topic]))
|
||||||
|
|
|
@ -21,7 +21,7 @@ RSpec.describe "topics/show.html.erb" do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "adds sturctured data" do
|
it "adds structured data" do
|
||||||
view.stubs(:include_crawler_content?).returns(true)
|
view.stubs(:include_crawler_content?).returns(true)
|
||||||
post = Fabricate(:post, topic: topic)
|
post = Fabricate(:post, topic: topic)
|
||||||
TopicLink.create!(
|
TopicLink.create!(
|
||||||
|
|
Loading…
Reference in New Issue