DEV: Fix random typos (#22078)

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
This commit is contained in:
Jarek Radosz 2023-06-13 22:02:21 +02:00 committed by GitHub
parent 286dfcacb4
commit dae3970bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 29 additions and 30 deletions

View File

@ -24,7 +24,7 @@ RSpec.describe FormTemplate, type: :model do
expect(t.save).to eq(false)
end
it "must have a type propety" do
it "must have a type property" do
template = "- hello: world"
t = Fabricate.build(:form_template, name: "Basic Template", template: template)
expect(t.save).to eq(false)

View File

@ -277,7 +277,7 @@ RSpec.describe Notification do
PostAlerter.post_created(@post)
end
it "should create and rollup private message notifications" do
it "should create and roll up private message notifications" do
expect(@target.notifications.first.notification_type).to eq(
Notification.types[:private_message],
)

View File

@ -222,7 +222,7 @@ RSpec.describe ScreenedIpAddress do
expect(screened_ip_address.reload.match_count).to eq(0)
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(
:screened_ip_address,
ip_address: "111.234.23.0/24",

View File

@ -85,7 +85,7 @@ RSpec.describe Sitemap do
expect(sitemap.topics).to be_empty
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)
topics_data = sitemap.topics.first

View File

@ -183,8 +183,8 @@ RSpec.describe TopicConverter do
it "invites only users with regular posts" do
post2 = Fabricate(:post, topic: topic)
whipser_post = 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[:whisper])
Fabricate(:post, topic: topic, post_type: Post.types[:small_action])
topic.convert_to_private_message(admin)

View File

@ -3097,7 +3097,7 @@ RSpec.describe Topic do
end
describe "removing oneself" do
it "should remove onself" do
it "should remove oneself" do
topic.allowed_users << user1
expect(topic.remove_allowed_user(user1, user1)).to eq(true)

View File

@ -20,7 +20,7 @@ RSpec.describe "TopicThumbnail" do
expect(topic.topic_thumbnails.length).to eq(1)
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
SiteSetting.create_thumbnails = true
topic2.generate_thumbnails!(extra_sizes: nil)
@ -32,7 +32,7 @@ RSpec.describe "TopicThumbnail" do
expect(Jobs::GenerateTopicThumbnails.jobs.size).to eq(0)
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
topic3.image_url(enqueue_if_missing: true)

View File

@ -127,7 +127,7 @@ RSpec.describe UploadReference do
describe "theme field uploads" do
fab!(:upload) { Fabricate(:upload) }
it "creates upload refererences" do
it "creates upload references" do
theme_field = nil
expect do
theme_field =
@ -152,7 +152,7 @@ RSpec.describe UploadReference do
describe "theme setting uploads" do
fab!(:upload) { Fabricate(:upload) }
it "creates upload refererences" do
it "creates upload references" do
theme_setting = nil
expect do
theme_setting =

View File

@ -202,7 +202,7 @@ RSpec.describe "Multisite s3 uploads", type: :multisite do
end
end
describe "secure uploadss" do
describe "secure uploads" do
let(:store) { FileStore::S3Store.new }
let(:client) { Aws::S3::Client.new(stub_responses: true) }
let(:resource) { Aws::S3::Resource.new(client: client) }
@ -401,7 +401,7 @@ RSpec.describe "Multisite s3 uploads", type: :multisite do
)
end
it "presigned url contans the metadata when provided" do
it "presigned url contains the metadata when provided" do
url =
store.signed_url_for_temporary_upload("test.png", metadata: { "test-meta": "testing" })
expect(url).to include("&x-amz-meta-test-meta=testing")

View File

@ -595,7 +595,7 @@ RSpec.describe Admin::BackupsController do
)
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
described_class.any_instance.expects(:has_enough_space_on_disk?).times(3).returns(true)

View File

@ -31,7 +31,7 @@ RSpec.describe Admin::FormTemplatesController do
end
end
context "when experiemental form templates is disabled" do
context "when experimental form templates is disabled" do
before do
sign_in(admin)
SiteSetting.experimental_form_templates = false

View File

@ -76,7 +76,7 @@ RSpec.describe Admin::GroupsController do
context "with Group.plugin_permitted_params" do
after { DiscoursePluginRegistry.reset! }
it "filter unpermitted params" do
it "filter non-permitted params" do
params = group_params
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)
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)
put "/admin/groups/automatic_membership_count.json",

View File

@ -331,7 +331,7 @@ RSpec.describe Admin::SiteSettingsController do
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"
expect_enqueued_with(
@ -352,7 +352,7 @@ RSpec.describe Admin::SiteSettingsController do
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"
expect_enqueued_with(
@ -607,7 +607,7 @@ RSpec.describe Admin::SiteSettingsController do
expect(response.status).to eq(200)
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)
put "/admin/site_settings/plugin_setting.json", params: { plugin_setting: "not allowed" }

View File

@ -236,7 +236,7 @@ RSpec.describe Admin::ThemesController do
end
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)
end

View File

@ -1430,7 +1430,7 @@ RSpec.describe Admin::UsersController do
end
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"
expect(response.status).to eq(404)

View File

@ -46,7 +46,7 @@ describe "Composer Form Templates", type: :system do
Fabricate(
:category,
name: "Multiple",
slug: "mulitple",
slug: "multiple",
topic_count: 10,
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
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.new_topic_button.click
expect(composer).to have_no_composer_preview

View File

@ -4,7 +4,6 @@ describe "Composer using review_media", type: :system do
fab!(:user) { Fabricate(:user) }
fab!(:topic) { Fabricate(:topic, category: Category.find(SiteSetting.uncategorized_category_id)) }
fab!(:post) { Fabricate(:post, topic: topic) }
# fab!(:upload) { Fabricate(:upload) }
let(:topic_page) { PageObjects::Pages::Topic.new }
before do

View File

@ -86,7 +86,7 @@ describe "Navigating with breadcrumbs", type: :system do
end
end
describe "initial pageloads for nosubcategories" do
describe "initial page loads for no-subcategories" do
it "shows correct data for /c/" do
visit("/c/#{category3.id}")
expect(page).to have_current_path("/c/#{category3.slug}/#{category3.id}/none")

View File

@ -27,7 +27,7 @@ describe "Tag synonyms", type: :system do
tags_page.visit_tag(tag_1)
tags_page.tag_info_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.select_tag(value: "graphics")
tags_page.add_synonym_btn.click

View File

@ -34,7 +34,7 @@ describe "Viewing sidebar mobile", type: :system, mobile: true do
expect(sidebar_dropdown).to be_hidden
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")
sidebar_dropdown.click

View File

@ -18,7 +18,7 @@ RSpec.describe "list/list.erb" do
)
end
it "adds sturctured data" do
it "adds structured data" do
view.stubs(:include_crawler_content?).returns(true)
topic.posters = []
assign(:list, OpenStruct.new(topics: [topic]))

View File

@ -21,7 +21,7 @@ RSpec.describe "topics/show.html.erb" do
)
end
it "adds sturctured data" do
it "adds structured data" do
view.stubs(:include_crawler_content?).returns(true)
post = Fabricate(:post, topic: topic)
TopicLink.create!(