From 46cde3f5b70246891d49c18b1a6f56f9e26af286 Mon Sep 17 00:00:00 2001 From: Andrey Demenev Date: Tue, 27 Aug 2024 21:13:36 +0400 Subject: [PATCH] Use a function call when a pipeline is only one function long --- .vscode/settings.json | 3 +++ test/support/case.ex | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..cac0e10e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} \ No newline at end of file diff --git a/test/support/case.ex b/test/support/case.ex index 23644fc3..36440056 100644 --- a/test/support/case.ex +++ b/test/support/case.ex @@ -106,8 +106,11 @@ defmodule Oban.Case do def insert_historical(state, timestamp_field, timestamp_age, scheduled_age) do opts = - [state: state, scheduled_at: seconds_ago(scheduled_age)] - |> Keyword.put(timestamp_field, seconds_ago(timestamp_age)) + Keyword.put( + [state: state, scheduled_at: seconds_ago(scheduled_age)], + timestamp_field, + seconds_ago(timestamp_age) + ) insert!(%{}, opts) end