Skip to content

test: fix invalid association warnings in has_one tests#3

Merged
fahchen merged 1 commit intomainfrom
fix/has-one-test-warnings
Apr 17, 2026
Merged

test: fix invalid association warnings in has_one tests#3
fahchen merged 1 commit intomainfrom
fix/has-one-test-warnings

Conversation

@fahchen
Copy link
Copy Markdown
Member

@fahchen fahchen commented Apr 17, 2026

Summary

  • Move Account and Settings module definitions from inside describe blocks to the test module top level
  • Fixes Ecto's __after_verify__ warning: "associated schema Account does not exist"

Root Cause

Modules defined inside describe blocks weren't resolvable by Ecto's association validation during with_tmpmodule parallel compilation. Moving them to the module top level (alongside Profile) ensures they're available.

Test plan

  • 150 tests pass, 0 warnings
  • Dialyzer clean
  • mix precommit passes

🤖 Generated with Claude Code

Hoist defmodule out of describe blocks to fix Ecto's __after_verify__
warning: "associated schema Account does not exist". Modules defined
inside describe blocks weren't resolvable during tmpmodule compilation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fahchen fahchen merged commit 17626bb into main Apr 17, 2026
4 checks passed
@fahchen fahchen deleted the fix/has-one-test-warnings branch April 17, 2026 09:57
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