Align project files with CodeHarbor
Since both projects are developed together and by the same team, we also want to have the same code structure and utility methods available in both projects. Therefore, this commit changes many files, but without a functional change.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe CodeharborLinksController do
|
||||
RSpec.describe CodeharborLinksController do
|
||||
render_views
|
||||
|
||||
let(:user) { create(:teacher) }
|
||||
@ -44,14 +44,13 @@ describe CodeharborLinksController do
|
||||
context 'with invalid params' do
|
||||
let(:params) { {push_url: '', check_uuid_url: '', api_key: ''} }
|
||||
|
||||
before { post_request }
|
||||
|
||||
it 'does not create a codeharbor_link' do
|
||||
expect { post_request }.not_to change(CodeharborLink, :count)
|
||||
end
|
||||
|
||||
it 'redirects to user show' do
|
||||
post_request
|
||||
expect(response).to render_template(:new)
|
||||
end
|
||||
expect_template(:new)
|
||||
end
|
||||
end
|
||||
|
||||
@ -79,14 +78,13 @@ describe CodeharborLinksController do
|
||||
context 'with invalid params' do
|
||||
let(:params) { {push_url: '', check_uuid_url: '', api_key: ''} }
|
||||
|
||||
before { put_request }
|
||||
|
||||
it 'does not change codeharbor_link' do
|
||||
expect { put_request }.not_to(change { codeharbor_link.reload.attributes })
|
||||
end
|
||||
|
||||
it 'redirects to user show' do
|
||||
put_request
|
||||
expect(response).to render_template(:edit)
|
||||
end
|
||||
expect_template(:edit)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user