-
Notifications
You must be signed in to change notification settings - Fork 4
Maintenance/increasing test coverage #148
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: develop
Are you sure you want to change the base?
Conversation
cba402b to
304d3ee
Compare
304d3ee to
a1e77f6
Compare
| end | ||
| resources :flags, only: [:index, :show, :create] | ||
| resources :transcript_speaker_edits, only: [:create] | ||
| resources :flags, only: [:index, :show, :create, :update, :destroy] |
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.
Check if update and destory methods are being used at all
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.
action exists. I want to keep this work black box approach as possible.
|
|
||
| describe "GET #edit" do | ||
| it "assigns the transcription_convention and renders edit" do | ||
| get :edit, params: { institution_id: institution.id, id: transcription_convention.id } |
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.
Make your tests DRYer wherever possible:
e.g.
let(:valid_attributes) { attributes_for(:transcription_convention) }
let(:invalid_attributes) { { convention_key: "" } }
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.
I dont see any advantage of doing this
IMO expecitly defining expect(assigns(:transcription_conventions)).to include(transcription_convention) for each tests involve is easier to read and much manageable than drying it out
d6f8979 to
94fcfaa
Compare
Summary
This PR significantly increases the RSpec test coverage for the Amplify project, raising it from 47% to 80%.