Skip to content

Commit

Permalink
merge?
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellen-Wittingen committed Jan 10, 2025
1 parent 91237b8 commit 530929c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
21 changes: 17 additions & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_04_13_094147) do
ActiveRecord::Schema[7.1].define(version: 2024_04_13_094147) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand Down Expand Up @@ -43,7 +43,7 @@
t.index ["user_id"], name: "index_credit_mutations_on_user_id"
end

create_table "sofia_accounts", force: :cascade do |t|
create_table "identities", force: :cascade do |t|
t.string "username", null: false
t.string "password_digest", null: false
t.bigint "user_id", null: false
Expand All @@ -52,8 +52,8 @@
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_sofia_accounts_on_user_id"
t.index ["username"], name: "index_sofia_accounts_on_username", unique: true
t.index ["user_id"], name: "index_identities_on_user_id"
t.index ["username"], name: "index_identities_on_username", unique: true
end

create_table "invoice_rows", force: :cascade do |t|
Expand Down Expand Up @@ -169,6 +169,19 @@
t.index ["user_id"], name: "index_roles_users_on_user_id"
end

create_table "sofia_accounts", force: :cascade do |t|
t.string "username", null: false
t.string "password_digest", null: false
t.bigint "user_id", null: false
t.string "otp_secret_key", null: false
t.boolean "otp_enabled", default: false
t.datetime "deleted_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["user_id"], name: "index_sofia_accounts_on_user_id"
t.index ["username"], name: "index_sofia_accounts_on_username", unique: true
end

create_table "users", force: :cascade do |t|
t.string "name"
t.datetime "deleted_at"
Expand Down
2 changes: 1 addition & 1 deletion spec/models/sofia_account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
let(:sofia_account) { create(:sofia_account, password: 'password1234') }

context 'username' do
subject(:duplicate_sofia_account) { build_stubbed(:sofia_account, username: sofia_account.username) }
subject(:duplicate_sofia_account) { build(:sofia_account, username: sofia_account.username) }

it { expect(duplicate_sofia_account).not_to be_valid }
end
Expand Down

0 comments on commit 530929c

Please sign in to comment.