Skip to content

Commit

Permalink
audit_spec.rb +1 SingleCov uncovered.
Browse files Browse the repository at this point in the history
  • Loading branch information
mshimizu-oc committed Dec 15, 2023
1 parent e70b4d7 commit fc05a40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/audited/audit_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require "spec_helper"

SingleCov.covered! uncovered: 2 # Rails version check
SingleCov.covered! uncovered: 2 + 1 # Rails version check + set_sql

class CustomAudit < Audited::Audit
def custom_method
Expand Down Expand Up @@ -357,7 +357,8 @@ class Models::ActiveRecord::CustomUserSubclass < Models::ActiveRecord::CustomUse

describe "as_audit_application" do
it "should set audit_application string" do
Audited::Audit.as_audit_application("test-app") do
Audited::Audit.as_audit_application("test-app")
Audited::Audit.as_user(user) do
company = Models::ActiveRecord::Company.create name: "The auditors"
company.name = "The Auditors, Inc"
company.save
Expand Down
1 change: 1 addition & 0 deletions spec/support/active_record/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
t.column :request_uuid, :string
t.column :created_at, :datetime
t.column :audit_application, :string
t.column :sql, :text
end

add_index :audits, [:auditable_id, :auditable_type], name: "auditable_index"
Expand Down

0 comments on commit fc05a40

Please # to comment.