mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 10:19:52 +01:00
Rename Inbox
model to InboxEntry
This commit is contained in:
parent
e754d6f174
commit
af9cbcdb11
3 changed files with 4 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class Inbox < ApplicationRecord
|
class InboxEntry < ApplicationRecord
|
||||||
belongs_to :user, touch: :inbox_updated_at
|
belongs_to :user, touch: :inbox_updated_at
|
||||||
belongs_to :question
|
belongs_to :question
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
FactoryBot.define do
|
FactoryBot.define do
|
||||||
factory :inbox do
|
factory :inbox_entry do
|
||||||
question { FactoryBot.build(:question) }
|
question { FactoryBot.build(:question) }
|
||||||
new { true }
|
new { true }
|
||||||
end
|
end
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
require "rails_helper"
|
require "rails_helper"
|
||||||
|
|
||||||
describe Inbox, type: :model do
|
describe InboxEntry, type: :model do
|
||||||
describe "associations" do
|
describe "associations" do
|
||||||
it { should belong_to(:user) }
|
it { should belong_to(:user) }
|
||||||
it { should belong_to(:question) }
|
it { should belong_to(:question) }
|
||||||
|
@ -13,7 +13,7 @@ describe Inbox, type: :model do
|
||||||
let(:question) { FactoryBot.create(:question, author_is_anonymous: true) }
|
let(:question) { FactoryBot.create(:question, author_is_anonymous: true) }
|
||||||
|
|
||||||
it "does not fail if the user wants to delete their account" do
|
it "does not fail if the user wants to delete their account" do
|
||||||
Inbox.create(user:, question:)
|
InboxEntry.create(user:, question:)
|
||||||
|
|
||||||
# this deletes the User record and enqueues the deletion of all
|
# this deletes the User record and enqueues the deletion of all
|
||||||
# associated records in sidekiq
|
# associated records in sidekiq
|
Loading…
Reference in a new issue