Skip to content

Day1 #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Day1 #2

wants to merge 2 commits into from

Conversation

prtngn
Copy link

@prtngn prtngn commented Mar 3, 2025

No description provided.

factory :user do
name { "John Doe" }
blocked { false }
created_at { DateTime.now }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

в фабриках лучше указывать минимальный набор атрибутов, например created/updated - проставятся и так через AR

end

it 'should be invalid when podcast is archived' do
podcast = create(:podcast, status: :archived)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а тут могли бы обойтись без создания?


context 'when user removed his like' do
it 'should not include episode' do
episode = create(:episode)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

создание вспомогательных объектов принято выносить в let

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.

2 participants