mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 06:09:30 +08:00
DEV: Fix random typos (#22345)
This commit is contained in:
parent
b61ea8e16d
commit
3290c954f9
|
@ -1691,7 +1691,7 @@ class PluginApi {
|
||||||
/**
|
/**
|
||||||
* Add a function to be called when there is a keyDown even on the search-menu widget.
|
* Add a function to be called when there is a keyDown even on the search-menu widget.
|
||||||
* This function runs before the default logic, and if one callback returns a falsey value
|
* This function runs before the default logic, and if one callback returns a falsey value
|
||||||
* the logic chain will stop, to prevent the core behavior from occuring.
|
* the logic chain will stop, to prevent the core behavior from occurring.
|
||||||
*
|
*
|
||||||
* Example usage:
|
* Example usage:
|
||||||
* ```
|
* ```
|
||||||
|
@ -2279,7 +2279,7 @@ class PluginApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Registers a hastag type and its corresponding class.
|
* Registers a hashtag type and its corresponding class.
|
||||||
* This is used when generating CSS classes in the hashtag-css-generator.
|
* This is used when generating CSS classes in the hashtag-css-generator.
|
||||||
*
|
*
|
||||||
* @param {string} type - The type of the hashtag.
|
* @param {string} type - The type of the hashtag.
|
||||||
|
|
|
@ -37,7 +37,7 @@ acceptance(
|
||||||
server.get("/u/eviltrout/card.json", () => helper.response(cardResponse));
|
server.get("/u/eviltrout/card.json", () => helper.response(cardResponse));
|
||||||
});
|
});
|
||||||
|
|
||||||
test("it displays the person's username followed by ther fullname", async function (assert) {
|
test("it displays the person's username followed by their fullname", async function (assert) {
|
||||||
await visit("/t/this-is-a-test-topic/9");
|
await visit("/t/this-is-a-test-topic/9");
|
||||||
await click('a[data-user-card="eviltrout"]');
|
await click('a[data-user-card="eviltrout"]');
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class Admin::GroupsController < Admin::StaffController
|
||||||
if group.automatic
|
if group.automatic
|
||||||
can_not_modify_automatic
|
can_not_modify_automatic
|
||||||
else
|
else
|
||||||
StaffActionLogger.new(current_user).log_group_deletetion(group)
|
StaffActionLogger.new(current_user).log_group_deletion(group)
|
||||||
|
|
||||||
group.destroy!
|
group.destroy!
|
||||||
render json: success_json
|
render json: success_json
|
||||||
|
|
|
@ -957,7 +957,7 @@ class StaffActionLogger
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def log_group_deletetion(group)
|
def log_group_deletion(group)
|
||||||
raise Discourse::InvalidParameters.new(:group) if group.nil?
|
raise Discourse::InvalidParameters.new(:group) if group.nil?
|
||||||
|
|
||||||
details = ["name: #{group.name}", "id: #{group.id}"]
|
details = ["name: #{group.name}", "id: #{group.id}"]
|
||||||
|
|
|
@ -813,7 +813,7 @@ RSpec.describe Guardian do
|
||||||
expect(Guardian.new(user).can_see_deleted_post?(post)).to be_falsey
|
expect(Guardian.new(user).can_see_deleted_post?(post)).to be_falsey
|
||||||
end
|
end
|
||||||
|
|
||||||
it "returns false if not ther person who deleted it" do
|
it "returns false if not the person who deleted it" do
|
||||||
post.update!(deleted_by: another_user)
|
post.update!(deleted_by: another_user)
|
||||||
expect(Guardian.new(user).can_see_deleted_post?(post)).to be_falsey
|
expect(Guardian.new(user).can_see_deleted_post?(post)).to be_falsey
|
||||||
end
|
end
|
||||||
|
@ -4195,7 +4195,7 @@ RSpec.describe Guardian do
|
||||||
expect(guardian.is_category_group_moderator?(plain_category)).to eq(false)
|
expect(guardian.is_category_group_moderator?(plain_category)).to eq(false)
|
||||||
expect(guardian.is_category_group_moderator?(plain_category)).to eq(false)
|
expect(guardian.is_category_group_moderator?(plain_category)).to eq(false)
|
||||||
|
|
||||||
# edge case ... site setting disabled while guardian instansiated (can help with test cases)
|
# edge case ... site setting disabled while guardian instantiated (can help with test cases)
|
||||||
SiteSetting.enable_category_group_moderation = false
|
SiteSetting.enable_category_group_moderation = false
|
||||||
expect(guardian.is_category_group_moderator?(category)).to eq(false)
|
expect(guardian.is_category_group_moderator?(category)).to eq(false)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user