We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } gem "activerecord", github: "rails/rails", branch: "7-0-stable" gem "activerecord-oracle_enhanced-adapter", github: "rsim/oracle-enhanced", branch: "release70" gem "minitest" platforms :ruby do gem "ruby-oci8", github: "kubo/ruby-oci8" end end require "active_record" require "minitest/autorun" require "logger" require "active_record/connection_adapters/oracle_enhanced_adapter" # Set Oracle enhanced adapter specific connection parameters DATABASE_NAME = ENV["DATABASE_NAME"] || "orcl" DATABASE_HOST = ENV["DATABASE_HOST"] DATABASE_PORT = ENV["DATABASE_PORT"] DATABASE_USER = ENV["DATABASE_USER"] || "oracle_enhanced" DATABASE_PASSWORD = ENV["DATABASE_PASSWORD"] || "oracle_enhanced" DATABASE_SYS_PASSWORD = ENV["DATABASE_SYS_PASSWORD"] || "admin" CONNECTION_PARAMS = { adapter: "oracle_enhanced", database: DATABASE_NAME, host: DATABASE_HOST, port: DATABASE_PORT, username: DATABASE_USER, password: DATABASE_PASSWORD } ActiveRecord::Base.establish_connection(CONNECTION_PARAMS) ActiveRecord::Base.logger = Logger.new(STDOUT) ActiveRecord::Schema.define do create_table :posts, force: true, id: false do |t| t.column :status, 'char(1)' end end class Post < ActiveRecord::Base enum status: { active: '0', archived: '1' } end class BugTest < Minitest::Test def test_association_stuff post = Post.create!(status: :archived) assert_equal 'archived', post.status assert post.archived? end end
post#archived? returns true
post#archived?
post#archived? returns false
1) Failure: BugTest#test_association_stuff [active_record_gem.rb:59]: Expected false to be truthy. 1 runs, 2 assertions, 1 failures, 0 errors, 0 skips
Rails version: 7.0.8
Oracle enhanced adapter version: 7.0.3
Ruby version: 3.1.3
Oracle Database version: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Steps to reproduce
Expected behavior
post#archived?
returns trueActual behavior
post#archived?
returns falseSystem configuration
Rails version: 7.0.8
Oracle enhanced adapter version: 7.0.3
Ruby version: 3.1.3
Oracle Database version: Oracle Database 19c Standard Edition 2 Release 19.0.0.0.0
The text was updated successfully, but these errors were encountered: