-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat(tests): add code coverage reporting #400
Changes from all commits
dcffab2
8fb8a2d
db70b20
4cfd948
bbba90b
6a7d7d6
e655b4b
7a8ea9f
5d8273c
c915945
f6377e9
1ccb7a1
9586b28
71f27a3
7aea898
5e882e9
214387f
45cf989
01a8dc8
49c7eaf
2318cde
c6a7ca4
3f25221
b15c2f1
508777b
fe78702
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ class V1::ApplicationResource < JSONAPI::Resource | |
def self.creatable_fields(_context) | ||
[] | ||
end | ||
|
||
# :nocov: | ||
|
||
def self.updatable_fields(context) | ||
|
@@ -22,7 +21,6 @@ def self.updatable_fields(context) | |
def self.searchable_fields | ||
[] | ||
end | ||
|
||
# :nocov: | ||
|
||
def self.apply_filter(records, filter, value, options) | ||
|
@@ -79,9 +77,11 @@ def current_user | |
context.fetch(:user) | ||
end | ||
|
||
# :nocov: | ||
def current_application | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This method seems unused There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is an endpoint, right? I suspect that's why it isn't covered by tests (or do we test endpoints too?) Did you check whether amber-ui depends on it? |
||
context.fetch(:application) | ||
end | ||
# :nocov: | ||
|
||
def self.current_user_or_application(options) | ||
options.fetch(:context).fetch(:user) || options.fetch(:context).fetch(:application) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe SentryJob, type: :job do | ||
describe '#perform' do | ||
let(:job) { described_class.new } | ||
|
||
before do | ||
allow(Raven).to receive(:send_event) | ||
job.perform('Example event') | ||
end | ||
|
||
it { expect(Raven).to have_received(:send_event).with('Example event') } | ||
end | ||
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.
do these result in some kind of comment on PRs, too?