Skip to content

Give the demo accounts an email so seeding works again - #186

Merged
misabegovic merged 1 commit into
mainfrom
fix/seed-demo-accounts
Oct 14, 2026
Merged

misabegovic merged 1 commit into
mainfrom
fix/seed-demo-accounts

Conversation

@misabegovic

Copy link
Copy Markdown
Owner

Summary

  • Since Move accounts to Devise, signed in by email #172 every account needs an email. The three demo users in db/seeds.rb had none, so db:seed rolled back at the first one and a fresh development database had no account to sign in with.
  • The demo accounts move to db/seeds/demo_users.rb (loaded by db/seeds.rb), each with an @usput.local email and confirmed up front, so nobody waits for a confirmation mail.
  • The summary printed at the end of seeding now names the email to sign in with.

Test plan

  • test/db/demo_users_seed_test.rb: one confirmed account per role, a demo account signs in through the real form, and loading twice creates no duplicates.
  • bin/rails db:seed:replant on development: 3 users, 25 places, 10 experiences, 4 plans, 173 reviews.
  • Full suite: 2462 runs, 5893 assertions, 0 failures, 0 errors, 1 skip.
  • Rubocop and erb_lint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JEmikXtNoH7wAg6veTjbyT

Since accounts moved to Devise (#172) every account needs an email, and the
three demo users had none, so db:seed rolled back at the first one and a fresh
development database had nobody to sign in as.

- The demo accounts live in db/seeds/demo_users.rb, loaded by db/seeds.rb,
  each with an @usput.local email and confirmed up front.
- The summary printed at the end names the email to sign in with.
- A test loads the file on its own, signs in with a demo account through the
  real form, and checks a second load creates nobody new.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JEmikXtNoH7wAg6veTjbyT
@misabegovic
misabegovic merged commit 0952481 into main Oct 14, 2026
1 check passed
@misabegovic
misabegovic deleted the fix/seed-demo-accounts branch October 14, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant