Skip to content
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

Merged
merged 17 commits into from
Mar 20, 2015
Merged

Controller tests #70

merged 17 commits into from
Mar 20, 2015

Conversation

henrikssn
Copy link
Contributor

Adds controller tests.

We should start focusing on authentication tests to support #69.

Work in progress. Help is welcome.

require 'rails_helper'


def sign_in(user = double('user'))

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

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #.

@davidwessman
Copy link
Member

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.

@davidwessman
Copy link
Member

The Rent tests have been changed in #52, does still need some controller-test.

@@ -0,0 +1,18 @@
#encoding: UTF-8

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after #.

@davidwessman davidwessman mentioned this pull request Mar 20, 2015
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)

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

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.

@davidwessman
Copy link
Member

This shit seriously never ends :O
Is your fancy VIM-editor perfectly tuned for this already? ;)

val = validate_uniqueness_of(:profile_id).
scoped_to(:post_id, :election_id).
with_message('har redan en likadan kandidatur').
on(:create)

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!


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra blank line detected.

davidwessman pushed a commit that referenced this pull request Mar 20, 2015
Merging test setup + candidate tests.
@davidwessman davidwessman merged commit b3796b7 into master Mar 20, 2015
@henrikssn
Copy link
Contributor Author

This PR was deployed to Production. Reference: d86e1fe

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

Successfully merging this pull request may close these issues.

3 participants