use nicer language in specs

Change-Id: I7ab827d040de38726800e252ee24482769c3e42d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/306139
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
This commit is contained in:
Aaron Ogata 2022-11-28 08:32:47 -08:00
parent 36cbb49c33
commit 3dcf6425d8
8 changed files with 18 additions and 18 deletions

View File

@ -2919,10 +2919,10 @@ describe DiscussionTopicsController, type: :request do
].sort_by { |h| h["id"] })
reply_reply1_attachment_json = {
"content-type" => "application/loser",
"content-type" => "application/unknown",
"url" => "http://www.example.com/files/#{@attachment.id}/download?download_frd=1&verifier=#{@attachment.uuid}",
"filename" => "unknown.loser",
"display_name" => "unknown.loser",
"filename" => "unknown.example",
"display_name" => "unknown.example",
"id" => @attachment.id,
"uuid" => @attachment.uuid,
"folder_id" => @attachment.folder_id,

View File

@ -1193,10 +1193,10 @@ describe "Submissions API", type: :request do
"extra_attempts" => nil,
"attachments" =>
[
{ "content-type" => "application/loser",
{ "content-type" => "application/unknown",
"url" => "http://www.example.com/files/#{sub1.attachments.first.id}/download?download_frd=1&verifier=#{sub1.attachments.first.uuid}",
"filename" => "unknown.loser",
"display_name" => "unknown.loser",
"filename" => "unknown.example",
"display_name" => "unknown.example",
"upload_status" => "success",
"id" => sub1.attachments.first.id,
"uuid" => sub1.attachments.first.uuid,
@ -1296,10 +1296,10 @@ describe "Submissions API", type: :request do
"display_name" => nil },
"attachments" =>
[
{ "content-type" => "application/loser",
{ "content-type" => "application/unknown",
"url" => "http://www.example.com/files/#{sub1.attachments.first.id}/download?download_frd=1&verifier=#{sub1.attachments.first.uuid}",
"filename" => "unknown.loser",
"display_name" => "unknown.loser",
"filename" => "unknown.example",
"display_name" => "unknown.example",
"upload_status" => "success",
"id" => sub1.attachments.first.id,
"uuid" => sub1.attachments.first.uuid,

View File

@ -734,7 +734,7 @@ describe AccountsController do
context "without :manage_storage_quotas" do
before :once do
role = custom_account_role "quota-loser", account: @account
role = custom_account_role "quota-example", account: @account
@account.role_overrides.create! permission: "manage_account_settings", enabled: true,
role: role
@account.account_users.create!(user: @user, role: role)

View File

@ -66,8 +66,8 @@ module Factories
context: @context,
size: 100,
folder: folder,
content_type: "application/loser",
filename: "unknown.loser"
content_type: "application/unknown",
filename: "unknown.example"
}
end

View File

@ -121,7 +121,7 @@ describe Types::FileType do
it "returns nil if the file is not a canvadocable type" do
allow(Canvadocs).to receive(:enabled?).and_return true
@student_file.update!(content_type: "application/loser")
@student_file.update!(content_type: "application/unknown")
expect(
@resolver.resolve('submissionPreviewUrl(submissionId: "' + @submission.id.to_s + '")')
).to be_nil

View File

@ -780,7 +780,7 @@ describe Canvas::LiveEvents do
attachment_model
expect_event("asset_accessed", {
asset_name: "unknown.loser",
asset_name: "unknown.example",
asset_type: "attachment",
asset_id: @attachment.global_id.to_s,
asset_subtype: nil,
@ -799,7 +799,7 @@ describe Canvas::LiveEvents do
context = OpenStruct.new(global_id: "1")
expect_event("asset_accessed", {
asset_name: "unknown.loser",
asset_name: "unknown.example",
asset_type: "attachment",
asset_id: @attachment.global_id.to_s,
asset_subtype: nil,

View File

@ -135,7 +135,7 @@ describe Lti::ContentItemResponse do
it "gets the title for a file" do
file = attachment_model(context: context)
content_item_response = subject({ files: [file.id] })
expect(content_item_response.title).to eq "unknown.loser"
expect(content_item_response.title).to eq "unknown.example"
end
it "gets the title for a assignment" do
@ -188,7 +188,7 @@ describe Lti::ContentItemResponse do
it "gets the files content_type" do
file = attachment_model(context: context)
content_item_response = subject({ files: [file.id] })
expect(content_item_response.content_type).to eq "application/loser"
expect(content_item_response.content_type).to eq "application/unknown"
end
it "gets the content_type for non files" do

View File

@ -1762,7 +1762,7 @@ describe Attachment do
before do
s3_storage!
Attachment.current_root_account = @old_account
@root = attachment_model(filename: "unknown 2.loser")
@root = attachment_model(filename: "unknown 2.example")
@child = attachment_model(root_attachment: @root)
@old_object = double("old object")