This commit is contained in:
riggraz
2025-02-04 16:20:20 +01:00
parent 8de94b4e12
commit e4ddf0e5f3

View File

@@ -19,8 +19,8 @@ RSpec.describe PostPolicy do
it { should permit(:update) } it { should permit(:update) }
it { should permit(:destroy) } it { should permit(:destroy) }
it 'permits "title" and "description" attributes' do it 'permits "title", "description" and "attachments" attributes' do
expect(subject.permitted_attributes_for_update).to eq([:title, :description]) expect(subject.permitted_attributes_for_update).to eq([:title, :description, :attachments])
end end
end end
end end
@@ -31,8 +31,8 @@ RSpec.describe PostPolicy do
it { should permit(:update) } it { should permit(:update) }
it { should permit(:destroy) } it { should permit(:destroy) }
it 'permits "title", "description", "board_id", "post_status_id" and "approval_status" attributes' do it 'permits "title", "description", "board_id", "post_status_id", "attachments", and "approval_status" attributes' do
permitted_attributes = [:title, :description, :board_id, :post_status_id, :approval_status] permitted_attributes = [:title, :description, :board_id, :post_status_id, :attachments, :approval_status]
expect(subject.permitted_attributes_for_update).to eq(permitted_attributes) expect(subject.permitted_attributes_for_update).to eq(permitted_attributes)
end end
end end