Skip to content

Commit

Permalink
Fixes #38078 - Correctly create a DB entry for settings test
Browse files Browse the repository at this point in the history
In `test/unit/tasks/seeds_test.rb` the `test does not change value for
existing setting` is failing because the DB setting is never created.
Due to a bug in mocha (that 2.7.0 fixed) this was never uncovered.

Fixes: 02dd983 ("Fixes #36395 - move value setting to seed")
  • Loading branch information
ekohl authored and adamruzicka committed Dec 10, 2024
1 parent 58e0d68 commit 2620245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/tasks/seeds_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def seed(*seed_files)
end

test 'does not change value for existing setting' do
Setting[:instance_id] = Foreman.uuid
Setting.create(name: 'instance_id', value: Foreman.uuid)
Setting.expects(:[]=).with(:instance_id, anything).never
seed('190-instance_id.rb')
end
Expand Down

0 comments on commit 2620245

Please sign in to comment.