Sha256: 456ce372dba10e38ced69cf243cc39fcab8526c6e66bd26483ba960550025475

Contents?: true

Size: 766 Bytes

Versions: 186

Compression:

Stored size: 766 Bytes

Contents

describe Appsignal::EventFormatter::Sequel::SqlFormatter do
  let(:klass)     { described_class }
  let(:formatter) { klass.new }

  it "registers the sql.sequel event formatter" do
    expect(Appsignal::EventFormatter.registered?("sql.sequel", klass)).to be_truthy
  end

  describe "#format" do
    before do
      stub_const(
        "SequelDatabaseTypeClass",
        Class.new do
          def self.to_s
            "SequelDatabaseTypeClassToString"
          end
        end
      )
    end
    let(:payload) do
      {
        :name => SequelDatabaseTypeClass,
        :sql => "SELECT * FROM users"
      }
    end
    subject { formatter.format(payload) }

    it { is_expected.to eq ["SequelDatabaseTypeClassToString", "SELECT * FROM users", 1] }
  end
end

Version data entries

186 entries across 186 versions & 1 rubygems

Version Path
appsignal-3.5.3-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.5.3 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.5.2-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.5.2 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.5.1-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.5.1 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.5.0-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.5.0 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.16-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.16 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.15-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.15 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.14-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.14 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.13-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.13 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.12-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.12 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.11-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.4.11 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb