You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test client and matchers do distinguish between strings and symbols. For instance, in our implementation we set the default location to :raw and in our specs we need to assert also with a symbol.
I think this is a little bit surprising and caused me some time to debug. As InfluxDB only supports JSON anyway, I propose to just store string hashes in our test client and assert strings in our specs.
The text was updated successfully, but these errors were encountered:
In our specs we use a test client to test if metrics were successfully written.
influxdb-rails/spec/support/test_client.rb
Lines 8 to 10 in 1c9d699
The test client is basically just an array with hashes. To simplify our specs we also have a custom rspec matcher
expect_metric
.influxdb-rails/spec/support/matchers.rb
Lines 7 to 17 in 1c9d699
The test client and matchers do distinguish between strings and symbols. For instance, in our implementation we set the default location to
:raw
and in our specs we need to assert also with a symbol.I think this is a little bit surprising and caused me some time to debug. As InfluxDB only supports JSON anyway, I propose to just store string hashes in our test client and assert strings in our specs.
The text was updated successfully, but these errors were encountered: