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

Spec coverage for CreateJob #3197

Merged
merged 2 commits into from Jun 6, 2017

Conversation

Projects
None yet
2 participants
@mdeniz
Copy link
Contributor

mdeniz commented Jun 5, 2017

Subclass UpdateReleasedBinaries was used to test the underlying methods.

BTW, introduced specs for Delayed Jobs, so the delay needed to be disabled for running the perform method inmidiately

RSpec.describe UpdateReleasedBinaries, vcr: true do
let(:project) { create(:project_with_repository) }
let(:repository) { project.repositories.first }
let(:event) { Event::Packtrack.new('project' => project.name, 'repo' => repository.name, 'payload' => 'fake_payload') }

This comment has been minimized.

@DavidKang

DavidKang Jun 5, 2017

Contributor

This could be project: project.name, repo: repository.name, payload: 'fake_payload'

This comment has been minimized.

@mdeniz

mdeniz Jun 6, 2017

Contributor

No, it's need to be string keys not symbols

let(:project) { create(:project_with_repository) }
let(:repository) { project.repositories.first }
let(:event) { Event::Packtrack.new('project' => project.name, 'repo' => repository.name, 'payload' => 'fake_payload') }
let(:event_without_repo) { Event::Packtrack.new('project' => project.name, 'repo' => nil, 'payload' => 'fake_payload') }

This comment has been minimized.

@DavidKang

DavidKang Jun 5, 2017

Contributor

same here

This comment has been minimized.

@mdeniz

mdeniz Jun 6, 2017

Contributor

Same here

@codecov

This comment has been minimized.

Copy link

codecov bot commented Jun 5, 2017

Codecov Report

Merging #3197 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3197      +/-   ##
==========================================
+ Coverage    88.8%   88.82%   +0.02%     
==========================================
  Files         267      267              
  Lines       17673    17673              
==========================================
+ Hits        15694    15698       +4     
+ Misses       1979     1975       -4
Flag Coverage Δ
#api 84.4% <ø> (+1.02%) ⬆️
#rspec 66.38% <ø> (+0.13%) ⬆️
#webui 63.06% <ø> (-0.48%) ⬇️
@DavidKang

This comment has been minimized.

Copy link
Contributor

DavidKang commented Jun 5, 2017

LGTM

@DavidKang DavidKang merged commit dcd92a2 into openSUSE:master Jun 6, 2017

4 checks passed

Hakiri No security warnings were found.
Details
codecov/patch Coverage not affected when comparing c8a5daf...0ae99d5
Details
codecov/project 88.82% (+0.02%) compared to c8a5daf
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@mdeniz mdeniz deleted the mdeniz:spec_cov_create_job branch Jun 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment