Skip to content

Commit

Permalink
Fix test and rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel committed Dec 5, 2024
1 parent 9bfea8c commit 473b7e9
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
describe '#permissions_changed?' do
let(:user) { FactoryBot.create(:user) }
let(:work) {
General.new(title: ['test work'])
}
General.new(title: ['test work'])
}

context 'with no new permissions or embargo' do
it 'returns false' do
Expand All @@ -84,11 +84,13 @@

context 'with an embargo added' do
it 'returns true' do
allow(work).to receive(:under_embargo?).and_return(true)
allow(work).to receive(:under_embargo?).and_return(false)
controller.instance_variable_set(:@curation_concern, work)

controller.send(:save_permissions)

allow(work).to receive(:under_embargo?).and_return(true)

expect(controller.send(:permissions_changed?)).to be true
end
end
Expand Down

0 comments on commit 473b7e9

Please sign in to comment.