From bb6a012dfc17e0ed7014fd4acd71bbbc1e413f12 Mon Sep 17 00:00:00 2001 From: Rasmus Kjellberg <2277443+kjellberg@users.noreply.github.com> Date: Mon, 10 Jun 2024 11:44:28 +0200 Subject: [PATCH] style: run rubocop --- test/dummy/db/schema.rb | 32 +++++++++++------------ test/services/invitations/destroy_test.rb | 2 +- test/services/teams/create_test.rb | 4 +-- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/test/dummy/db/schema.rb b/test/dummy/db/schema.rb index 1e14bd0..49ecced 100644 --- a/test/dummy/db/schema.rb +++ b/test/dummy/db/schema.rb @@ -18,10 +18,10 @@ t.datetime "accepted_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["account_id", "email"], name: "index_account_invitations_on_account_id_and_email", unique: true - t.index ["account_id"], name: "index_account_invitations_on_account_id" - t.index ["email"], name: "index_account_invitations_on_email" - t.index ["public_uid"], name: "index_account_invitations_on_public_uid", unique: true + t.index [ "account_id", "email" ], name: "index_account_invitations_on_account_id_and_email", unique: true + t.index [ "account_id" ], name: "index_account_invitations_on_account_id" + t.index [ "email" ], name: "index_account_invitations_on_email" + t.index [ "public_uid" ], name: "index_account_invitations_on_public_uid", unique: true end create_table "account_users", force: :cascade do |t| @@ -31,10 +31,10 @@ t.datetime "updated_at", null: false t.string "public_uid" t.boolean "owner", default: false, null: false - t.index ["account_id", "user_id"], name: "index_account_users_on_account_id_and_user_id", unique: true - t.index ["account_id"], name: "index_account_users_on_account_id" - t.index ["public_uid"], name: "index_account_users_on_public_uid", unique: true - t.index ["user_id"], name: "index_account_users_on_user_id" + t.index [ "account_id", "user_id" ], name: "index_account_users_on_account_id_and_user_id", unique: true + t.index [ "account_id" ], name: "index_account_users_on_account_id" + t.index [ "public_uid" ], name: "index_account_users_on_public_uid", unique: true + t.index [ "user_id" ], name: "index_account_users_on_user_id" end create_table "accounts", force: :cascade do |t| @@ -44,7 +44,7 @@ t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "account_invitations_count", default: 0 - t.index ["public_uid"], name: "index_accounts_on_public_uid", unique: true + t.index [ "public_uid" ], name: "index_accounts_on_public_uid", unique: true end create_table "omniauth_identities", force: :cascade do |t| @@ -58,8 +58,8 @@ t.datetime "expires_at" t.datetime "created_at", null: false t.datetime "updated_at", null: false - t.index ["public_uid"], name: "index_omniauth_identities_on_public_uid", unique: true - t.index ["user_id"], name: "index_omniauth_identities_on_user_id" + t.index [ "public_uid" ], name: "index_omniauth_identities_on_public_uid", unique: true + t.index [ "user_id" ], name: "index_omniauth_identities_on_user_id" end create_table "users", force: :cascade do |t| @@ -89,11 +89,11 @@ t.text "otp_backup_codes" t.string "locale", default: "en" t.string "time_zone", default: "UTC" - t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true - t.index ["email"], name: "index_users_on_email", unique: true - t.index ["personal_account_id"], name: "index_users_on_personal_account_id" - t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true - t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true + t.index [ "confirmation_token" ], name: "index_users_on_confirmation_token", unique: true + t.index [ "email" ], name: "index_users_on_email", unique: true + t.index [ "personal_account_id" ], name: "index_users_on_personal_account_id" + t.index [ "reset_password_token" ], name: "index_users_on_reset_password_token", unique: true + t.index [ "unlock_token" ], name: "index_users_on_unlock_token", unique: true end add_foreign_key "account_invitations", "accounts" diff --git a/test/services/invitations/destroy_test.rb b/test/services/invitations/destroy_test.rb index e9435f0..2e58b8d 100644 --- a/test/services/invitations/destroy_test.rb +++ b/test/services/invitations/destroy_test.rb @@ -14,7 +14,7 @@ def setup invitation = create(:account_invitation, account: account) @service.call(invitation: invitation, user: user) - refute AccountInvitation.find_by_id(invitation.id) + assert_not AccountInvitation.find_by_id(invitation.id) end end end diff --git a/test/services/teams/create_test.rb b/test/services/teams/create_test.rb index 78126ee..b83d5a6 100644 --- a/test/services/teams/create_test.rb +++ b/test/services/teams/create_test.rb @@ -13,9 +13,9 @@ def setup team = build(:account) @service.call(account: team, user:) - refute_empty team.account_users, "Expected account_users not to be empty" + assert_not_empty team.account_users, "Expected account_users not to be empty" assert team.account_users.find_by(user: user).owner, "Expected account_users to have owner set to true" - refute team.personal, "Expected personal to be false" + assert_not team.personal, "Expected personal to be false" assert team.persisted?, "Expected account to be saved" end