-
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
Controller tests #70
Controller tests #70
Conversation
require 'rails_helper' | ||
|
||
|
||
def sign_in(user = double('user')) |
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.
Assignment Branch Condition size for sign_in is too high. [26.02/15]
RSpec.configure do |config| | ||
config.include Devise::TestHelpers, :type => :controller |
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 the new Ruby 1.9 hash syntax.
@@ -0,0 +1,17 @@ | |||
#encoding: UTF-8 |
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.
Missing space after #.
Will start here as well after CafeModule is live. Good to have some examples to go after as well, nice setup with Devise-helpers + the new factories. |
The Rent tests have been changed in #52, does still need some controller-test. |
@@ -0,0 +1,18 @@ | |||
#encoding: UTF-8 |
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.
Missing space after #.
def candidate_params | ||
params.require(:candidate).permit(:profile_id,:post_id,:stil_id,:email,:phone,:motivation, :name,:lastname) | ||
params.require(:candidate).permit(:profile_id, :post_id, :stil_id, :email, :phone, :name, :lastname) |
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.
Line is too long. [104/100]
end | ||
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.
Extra empty line detected at block body end.
This shit seriously never ends :O |
val = validate_uniqueness_of(:profile_id). | ||
scoped_to(:post_id, :election_id). | ||
with_message('har redan en likadan kandidatur'). | ||
on(:create) |
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.
Align the operands of an expression in an assignment spanning multiple lines.
@@ -50,6 +50,9 @@ | |||
# https://relishapp.com/rspec/rspec-rails/docs | |||
config.infer_spec_type_from_file_location! | |||
|
|||
|
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.
Extra blank line detected.
Merging test setup + candidate tests.
This PR was deployed to Production. Reference: d86e1fe |
Adds controller tests.
We should start focusing on authentication tests to support #69.
Work in progress. Help is welcome.