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-4.0.6-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.6 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.5-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.5 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.4-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.4 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.3-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.3 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.2-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.2 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.1-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.1 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.0-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.0 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.13.1-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.13.1 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.13.1.alpha.1-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-3.13.1.alpha.1 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.0.beta.2-java spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb
appsignal-4.0.0.beta.2 spec/lib/appsignal/event_formatter/sequel/sql_formatter_spec.rb