drop blob_entries_* tables

This commit is contained in:
Dylan Knutson
2025-07-21 21:14:44 +00:00
parent 537821a1a9
commit 538d3919d9
3 changed files with 25 additions and 2792 deletions

View File

@@ -12,22 +12,22 @@ end
RSpec.describe BlobEntriesController, type: :controller do
render_views
let(:blob_entry) do
let(:blob_file) do
create(
:blob_entry,
:blob_file,
content_type: "image/jpeg",
content:
contents:
File.read(
Rails.root.join("app/assets/images/domain-icons/inkbunny.png"),
),
)
end
let(:sha256_hex) { HexUtil.bin2hex(blob_entry.sha256) }
let(:sha256_hex) { HexUtil.bin2hex(blob_file.sha256) }
describe "GET #show" do
context "with plain text content" do
let(:blob_entry) do
create(:blob_entry, content_type: "text/plain", content: "Hello World")
let(:blob_file) do
create(:blob_file, content_type: "text/plain", contents: "Hello World")
end
it "renders content as plain text" do
@@ -39,8 +39,8 @@ RSpec.describe BlobEntriesController, type: :controller do
end
context "with HTML content" do
let(:blob_entry) do
create(:blob_entry, content_type: "text/html", content: "<p>Hello</p>")
let(:blob_file) do
create(:blob_file, content_type: "text/html", contents: "<p>Hello</p>")
end
it "renders content as HTML" do
@@ -52,11 +52,11 @@ RSpec.describe BlobEntriesController, type: :controller do
end
context "with json content" do
let(:blob_entry) do
let(:blob_file) do
create(
:blob_entry,
:blob_file,
content_type: "application/json",
content: '{"hello":"world"}',
contents: '{"hello":"world"}',
)
end
@@ -95,11 +95,11 @@ RSpec.describe BlobEntriesController, type: :controller do
end
context "png that has a gif extension and content type" do
let(:blob_entry) do
let(:blob_file) do
create(
:blob_entry,
:blob_file,
content_type: "image/gif",
content:
contents:
File.read(
Rails.root.join("test/fixtures/files/images/fa.24326406.gif"),
),