Skip to content

Commit

Permalink
Introduce change that should cause credit_spec to fail
Browse files Browse the repository at this point in the history
This is a breaking change. The credits counter is no longer populated yet the
specs pass.

These tests should fail:
`#credits_count counts credits for organization`
`#credits_count counts credits for user`

Instead of comparing the column value with the expected credit count, the
tests are comparing zero.
  • Loading branch information
codeandclay committed Feb 22, 2024
1 parent 561bdb2 commit 0d64806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/credit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Credit < ApplicationRecord
column_names: {
["credits.spent = ?", true] => "spent_credits_count",
["credits.spent = ?", false] => "unspent_credits_count",
["credits.id > ?", 0] => "credits_count"
# ["credits.id > ?", 0] => "credits_count"
}
end

Expand Down

0 comments on commit 0d64806

Please sign in to comment.