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
#281 - Add a count for customers created per day #314
#281 - Add a count for customers created per day #314
Conversation
Also: - Add a customer test_changeset. This allows us to modify the `inserted_at` column in tests. - Add tests for count_customers_by_date methods. Separated from the other test blocks because we don't need to create a customer during the setup.
Also, add specs to new customer reporting methods
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.
looks great @jonathanyeong! :)
just one small nitpick and then should be good to merge 🎉
lib/chat_api/customers/customer.ex
Outdated
@@ -102,4 +102,10 @@ defmodule ChatApi.Customers.Customer do | |||
:time_zone | |||
]) | |||
end | |||
|
|||
def test_changeset(message, attrs) do | |||
message |
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.
nit -- let's change message
to customer
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.
Argh copy and paste error. Good catch thanks!
Darn copy and paste error.
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.
thanks @jonathanyeong! 😄
Description
Adds methods in Reporting to get the number of customers created per day.
Also:
inserted_at
column in tests.we don't need to create a customer during the setup.
Issue
#281
Checklist
mix test
mix format