mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 10:09:53 +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
|
||||
|
||||
class Inbox < ApplicationRecord
|
||||
class InboxEntry < ApplicationRecord
|
||||
belongs_to :user, touch: :inbox_updated_at
|
||||
belongs_to :question
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
FactoryBot.define do
|
||||
factory :inbox do
|
||||
factory :inbox_entry do
|
||||
question { FactoryBot.build(:question) }
|
||||
new { true }
|
||||
end
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
require "rails_helper"
|
||||
|
||||
describe Inbox, type: :model do
|
||||
describe InboxEntry, type: :model do
|
||||
describe "associations" do
|
||||
it { should belong_to(:user) }
|
||||
it { should belong_to(:question) }
|
||||
|
@ -13,7 +13,7 @@ describe Inbox, type: :model do
|
|||
let(:question) { FactoryBot.create(:question, author_is_anonymous: true) }
|
||||
|
||||
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
|
||||
# associated records in sidekiq
|
Loading…
Reference in a new issue