From dae3970badc02a8372c397036d0a1813b51ec3d5 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Tue, 13 Jun 2023 22:02:21 +0200 Subject: [PATCH] DEV: Fix random typos (#22078) Co-authored-by: Penar Musaraj --- spec/models/form_template_spec.rb | 2 +- spec/models/notification_spec.rb | 2 +- spec/models/screened_ip_address_spec.rb | 2 +- spec/models/sitemap_spec.rb | 2 +- spec/models/topic_converter_spec.rb | 4 ++-- spec/models/topic_spec.rb | 2 +- spec/models/topic_thumbnail_spec.rb | 4 ++-- spec/models/upload_reference_spec.rb | 4 ++-- spec/multisite/s3_store_spec.rb | 4 ++-- spec/requests/admin/backups_controller_spec.rb | 2 +- spec/requests/admin/form_templates_controller_spec.rb | 2 +- spec/requests/admin/groups_controller_spec.rb | 4 ++-- spec/requests/admin/site_settings_controller_spec.rb | 6 +++--- spec/requests/admin/themes_controller_spec.rb | 2 +- spec/requests/admin/users_controller_spec.rb | 2 +- spec/system/composer/category_templates_spec.rb | 4 ++-- .../system/composer/review_media_unless_trust_level_spec.rb | 1 - spec/system/discovery_breadcrumb_navigation_spec.rb | 2 +- spec/system/tag_synonyms_spec.rb | 2 +- spec/system/viewing_sidebar_mobile_spec.rb | 2 +- spec/views/list/list.erb_spec.rb | 2 +- spec/views/topics/show.html.erb_spec.rb | 2 +- 22 files changed, 29 insertions(+), 30 deletions(-) diff --git a/spec/models/form_template_spec.rb b/spec/models/form_template_spec.rb index f7c730d9795..d36a8c67ee1 100644 --- a/spec/models/form_template_spec.rb +++ b/spec/models/form_template_spec.rb @@ -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) diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index ee3c09c4d9b..447ac9e2ae7 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -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], ) diff --git a/spec/models/screened_ip_address_spec.rb b/spec/models/screened_ip_address_spec.rb index 4e277a08ccf..12dc678ae33 100644 --- a/spec/models/screened_ip_address_spec.rb +++ b/spec/models/screened_ip_address_spec.rb @@ -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", diff --git a/spec/models/sitemap_spec.rb b/spec/models/sitemap_spec.rb index 1f922b5805b..254e24127d3 100644 --- a/spec/models/sitemap_spec.rb +++ b/spec/models/sitemap_spec.rb @@ -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 diff --git a/spec/models/topic_converter_spec.rb b/spec/models/topic_converter_spec.rb index 9d8da65a333..380aa63a2df 100644 --- a/spec/models/topic_converter_spec.rb +++ b/spec/models/topic_converter_spec.rb @@ -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) diff --git a/spec/models/topic_spec.rb b/spec/models/topic_spec.rb index d5af3d60ec6..2014ad8f5b7 100644 --- a/spec/models/topic_spec.rb +++ b/spec/models/topic_spec.rb @@ -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) diff --git a/spec/models/topic_thumbnail_spec.rb b/spec/models/topic_thumbnail_spec.rb index 1b070e729e0..d529d26f26d 100644 --- a/spec/models/topic_thumbnail_spec.rb +++ b/spec/models/topic_thumbnail_spec.rb @@ -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) diff --git a/spec/models/upload_reference_spec.rb b/spec/models/upload_reference_spec.rb index 79785d12de9..c7675a4577a 100644 --- a/spec/models/upload_reference_spec.rb +++ b/spec/models/upload_reference_spec.rb @@ -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 = diff --git a/spec/multisite/s3_store_spec.rb b/spec/multisite/s3_store_spec.rb index 17eb4e9961f..062bbecde6d 100644 --- a/spec/multisite/s3_store_spec.rb +++ b/spec/multisite/s3_store_spec.rb @@ -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") diff --git a/spec/requests/admin/backups_controller_spec.rb b/spec/requests/admin/backups_controller_spec.rb index 6bb5519c5f0..a2157f144ce 100644 --- a/spec/requests/admin/backups_controller_spec.rb +++ b/spec/requests/admin/backups_controller_spec.rb @@ -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) diff --git a/spec/requests/admin/form_templates_controller_spec.rb b/spec/requests/admin/form_templates_controller_spec.rb index 0a858452a26..c8503cb2563 100644 --- a/spec/requests/admin/form_templates_controller_spec.rb +++ b/spec/requests/admin/form_templates_controller_spec.rb @@ -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 diff --git a/spec/requests/admin/groups_controller_spec.rb b/spec/requests/admin/groups_controller_spec.rb index 5f101bf10bc..f36ec50a38c 100644 --- a/spec/requests/admin/groups_controller_spec.rb +++ b/spec/requests/admin/groups_controller_spec.rb @@ -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", diff --git a/spec/requests/admin/site_settings_controller_spec.rb b/spec/requests/admin/site_settings_controller_spec.rb index b0dcd4987a5..05bfda5edc8 100644 --- a/spec/requests/admin/site_settings_controller_spec.rb +++ b/spec/requests/admin/site_settings_controller_spec.rb @@ -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" } diff --git a/spec/requests/admin/themes_controller_spec.rb b/spec/requests/admin/themes_controller_spec.rb index c2874670b61..75571da04f5 100644 --- a/spec/requests/admin/themes_controller_spec.rb +++ b/spec/requests/admin/themes_controller_spec.rb @@ -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 diff --git a/spec/requests/admin/users_controller_spec.rb b/spec/requests/admin/users_controller_spec.rb index bdb6593e017..6ccabc56a18 100644 --- a/spec/requests/admin/users_controller_spec.rb +++ b/spec/requests/admin/users_controller_spec.rb @@ -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) diff --git a/spec/system/composer/category_templates_spec.rb b/spec/system/composer/category_templates_spec.rb index 1115c152600..f930a483646 100644 --- a/spec/system/composer/category_templates_spec.rb +++ b/spec/system/composer/category_templates_spec.rb @@ -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 diff --git a/spec/system/composer/review_media_unless_trust_level_spec.rb b/spec/system/composer/review_media_unless_trust_level_spec.rb index 941808eb80f..487d0beca2d 100644 --- a/spec/system/composer/review_media_unless_trust_level_spec.rb +++ b/spec/system/composer/review_media_unless_trust_level_spec.rb @@ -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 diff --git a/spec/system/discovery_breadcrumb_navigation_spec.rb b/spec/system/discovery_breadcrumb_navigation_spec.rb index 41b05402f3c..d72fd1f1e43 100644 --- a/spec/system/discovery_breadcrumb_navigation_spec.rb +++ b/spec/system/discovery_breadcrumb_navigation_spec.rb @@ -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") diff --git a/spec/system/tag_synonyms_spec.rb b/spec/system/tag_synonyms_spec.rb index 5a0547955c0..10fc6ac5b22 100644 --- a/spec/system/tag_synonyms_spec.rb +++ b/spec/system/tag_synonyms_spec.rb @@ -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 diff --git a/spec/system/viewing_sidebar_mobile_spec.rb b/spec/system/viewing_sidebar_mobile_spec.rb index daa71e2b164..192fe4d07e4 100644 --- a/spec/system/viewing_sidebar_mobile_spec.rb +++ b/spec/system/viewing_sidebar_mobile_spec.rb @@ -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 diff --git a/spec/views/list/list.erb_spec.rb b/spec/views/list/list.erb_spec.rb index e83def6a3e4..8b8ebfb9a70 100644 --- a/spec/views/list/list.erb_spec.rb +++ b/spec/views/list/list.erb_spec.rb @@ -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])) diff --git a/spec/views/topics/show.html.erb_spec.rb b/spec/views/topics/show.html.erb_spec.rb index 026e58ff965..d99be622c30 100644 --- a/spec/views/topics/show.html.erb_spec.rb +++ b/spec/views/topics/show.html.erb_spec.rb @@ -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!(