-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature create event #24
base: master
Are you sure you want to change the base?
Conversation
- Create fabricator for event model
* Preventing increasing of the test database
* Also use the thin gem to use instead of webrick in development
Conflicts: Gemfile
@@ -0,0 +1,6 @@ | |||
Fabricator :user do | |||
email { sequence { |n| "user_#{n}@hackdmx.com" } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always use *@example.com
dummy email addresses. That's the first step to avoid sending emails to actual email addresses when testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure because in that case it will send emails to *@example.com, and that domain actually exist and we don't control it, in my opinion it would be a better idea to use a domain that we do control.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seriously, example.com
is a special and reserved domain, see this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
def update | ||
|
||
find_event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Y U NO use a before_action
?
Conflicts: app/models/user.rb config/routes.rb
… feature_create_event Conflicts: db/schema.rb
Conflicts: Gemfile Gemfile.lock
redirect_to events_path | ||
else | ||
flash[:error] = 'Something went wrong' | ||
render new_event_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At line 37 you use render action: 'edit'
and here you use a path helper. Isn't this somewhat inconsistent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
* Avoiding redundancy * Using the path helper is breaking the test
👍 |
No description provided.