Skip to content

Commit

Permalink
Release v2.16.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sorentwo committed Oct 3, 2023
1 parent 2bcd1f8 commit b3b2bdd
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,30 @@ Now `unique` has a `timestamp` option that allows checking the `:scheduled_at` t
use Oban.Worker, unique: [period: 120, timestamp: :scheduled_at]
```

## v2.16.2 — 2023-10-03

### Bug Fixes

- [Testing] Match args/meta patterns in Elixir rather than the database

The containment operators, `@>` and `<@`, used for pattern matching in tests are only available
in Postgres and have some quirks. Most notably, containment considers matching any value in a
list a successful match, which isn't intuitive or desirable.

The other issue with using a containment operator in tests is that SQLite doesn't have those
operators available and test helpers are shared between all engines.

### Enhancements

- [Testing] Support wildcard matcher in patterns for args/meta

Now that we match in Elixir, it's simple to support wildcard matching with a `:_` to assert that
a key is present in a json field without specifying an exact value.

```elixir
assert_enqueued args: %{batch_id: :_, callback: true}
```

## v2.16.1 — 2023-09-25

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule Oban.MixProject do
use Mix.Project

@source_url "https://github.com/sorentwo/oban"
@version "2.16.1"
@version "2.16.2"

def project do
[
Expand Down

0 comments on commit b3b2bdd

Please sign in to comment.