-
Notifications
You must be signed in to change notification settings - Fork 2
Add worker tests #22
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
base: master
Are you sure you want to change the base?
Add worker tests #22
Conversation
|
|
||
| shared_examples 'creates the physical file with data' do | ||
| it 'creates the physical file at the given location_url' do | ||
| subject |
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.
maybe it's a good idea to add expect(File.open(admin_report.reload.location_url)).to_not be before running the subject to make sure that the subject is actually creating it. Same for the other tests
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.
Cannot do File.open of a file that does not exist. I can try to do something like expect { File.open(admin_report.location_url.to_s) }.to raise_exception(Errno::ENOENT), wdyt?
santib
left a comment
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 for doing this! ❤️
juanmanuelramallo
left a comment
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.
Looking good! Left some non blocking comments
Co-authored-by: Juan Manuel Ramallo <juanmanuelramallo@hey.com>
megatux
left a comment
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.
Hey @Ricoch I wanted to run the tests but fail here. How do I setup the DB or run the RSpec tests?
Maybe add test running instructions to the README.md file?
Adds configuration for testing and tests for the worker.