mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
fix spec
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user