-
Notifications
You must be signed in to change notification settings - Fork 11
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
Increase coverage of project #934
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #934 +/- ##
===========================================
+ Coverage 96.73% 98.71% +1.97%
===========================================
Files 73 71 -2
Lines 1012 1011 -1
===========================================
+ Hits 979 998 +19
+ Misses 33 13 -20 ☔ View full report in Codecov by Sentry. |
…ial-projects/ZeroWaste into 930-increase-coverage-of-project
…ial-projects/ZeroWaste into 930-increase-coverage-of-project
@@ -0,0 +1,7 @@ | |||
FactoryBot.define do | |||
factory :authorization do | |||
uid { "unique_uid" } |
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.
SecureHex.uid якось так
product.attributes = { | ||
prices_attributes: [ | ||
{ sum: 100 } | ||
] | ||
} |
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.
NEVER use local vars in specs
spec/requests/calculators_spec.rb
Outdated
before do | ||
sign_in user | ||
end |
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.
use shared context, it's already present
spec/requests/home_spec.rb
Outdated
@@ -22,6 +22,14 @@ | |||
end | |||
end | |||
|
|||
context "redirect to root_url" do | |||
it "is successful" do | |||
get "/" |
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.
use route helpers
describe "#perform!" do | ||
context "when preferable is set to 1" do | ||
it "updates other calculators to have preferable set to false" do | ||
service = Calculators::PreferableService.new(preferable: 1, slug: calculator1.slug) |
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.
the same thing!
03a3caf
to
7d2dc81
Compare
…to 930-increase-coverage-of-project
dev #930
Code reviewers
Summary of issue
Increase coverage of project
Summary of change
Testing approach
Run coverage localy
CHECK LIST