Skip to content

Commit

Permalink
Fixup PR
Browse files Browse the repository at this point in the history
  • Loading branch information
d4be4st committed Oct 21, 2024
1 parent c985c07 commit eb0c4da
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/enumerations/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Enumerations
VERSION = '2.6.0'.freeze
VERSION = '2.5.4'.freeze
end
10 changes: 5 additions & 5 deletions test/configuration/enumerations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def test_enumerated_class_scope_hash_value
end

def test_enumerations_overrides
assert_equal :id, OveridableStatus.primary_key
assert_equal :id, OveridableStatus.foreign_key_suffix
assert_equal :id, OverridableStatus.primary_key
assert_equal :id, OverridableStatus.foreign_key_suffix

model = OveridableModel.new
model.overidable_status = OveridableStatus.draft
model = OverridableModel.new
model.overridable_status = OverridableStatus.draft

assert_equal 1, model.overidable_status_id
assert_equal 1, model.overridable_status_id
end
end
end
4 changes: 2 additions & 2 deletions test/helpers/database_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
t.integer :custom_enum
end

create_table :overidable_models, force: true do |t|
t.integer :overidable_status_id
create_table :overridable_models, force: true do |t|
t.integer :overridable_status_id
end
end
6 changes: 3 additions & 3 deletions test/helpers/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ class User < ActiveRecord::Base
enumeration :status
end

class OveridableStatus < Enumerations::Base
class OverridableStatus < Enumerations::Base
self.primary_key = :id
self.foreign_key_suffix = :id

value :draft, id: 1
end

class OveridableModel < ActiveRecord::Base
enumeration :overidable_status
class OverridableModel < ActiveRecord::Base
enumeration :overridable_status
end

0 comments on commit eb0c4da

Please sign in to comment.