Skip to content

Instantly share code, notes, and snippets.

@mocoso
Created September 2, 2013 13:50
Show Gist options
  • Save mocoso/6413069 to your computer and use it in GitHub Desktop.
Save mocoso/6413069 to your computer and use it in GitHub Desktop.
Failures once public
Failures:
1) session authentication inactive sessions expire after 48 hours
Failure/Error: current_path.should eql(sign_in_path)
expected: "/sign-in"
got: "/courses"
(compared using eql?)
# ./spec/features/user_sessions_spec.rb:26:in `block (2 levels) in <top (required)>'
2) session authentication selecting remember me keeps users signed in for two weeks
Failure/Error: current_path.should eql(sign_in_path)
expected: "/sign-in"
got: "/courses"
(compared using eql?)
# ./spec/features/user_sessions_spec.rb:53:in `block (2 levels) in <top (required)>'
3) session authentication accessing pages prevents sessions from expiring
Failure/Error: current_path.should eql(sign_in_path)
expected: "/sign-in"
got: "/courses"
(compared using eql?)
# ./spec/features/user_sessions_spec.rb:40:in `block (2 levels) in <top (required)>'
4) UserRegistrationsController GET #new when the invitation exists but has already been accepted redirects to sign-in with email address and flash alert
Failure/Error: response.should redirect_to(sign_in_path(email: email)) [103/228]
Expected response to be a <redirect>, but was <200>
# ./spec/controllers/user_registrations_controller_spec.rb:46:in `block (4 levels) in <top (required)>'
5) UserRegistrationsController GET #new when the invitation exists and has not yet been accepted makes the invitation available to the view
Failure/Error: assigns[:invitation].should == invitation
expected: #<RSpec::Mocks::Mock:0x3ffb260fc77c @name=nil>
got: nil (using ==)
# ./spec/controllers/user_registrations_controller_spec.rb:30:in `block (4 levels) in <top (required)>'
6) UserRegistrationsController GET #new when the invitation exists and has not yet been accepted makes a new user available to the view with the email address from the invitation
Failure/Error: assigns[:user].email.should == email
expected: "foo@example.com"
got: nil (using ==)
# ./spec/controllers/user_registrations_controller_spec.rb:35:in `block (4 levels) in <top (required)>'
7) UserRegistrationsController POST #create creates the user with the given details
Failure/Error: User.should_receive(:register).with(user, invitation)
(<User(id: integer, first_name: string, last_name: string, email: string, created_at: datetime, updated_at: datetime, password_digest: string, short_description: text, locat
ion: string, image: string, role: string, key: string, terms_and_conditions: boolean, honour_code: boolean, organisation_id: integer) (class)>).register(#<User id: 0, first_name: n
il, last_name: nil, email: "user@example.com", created_at: nil, updated_at: nil, password_digest: nil, short_description: nil, location: nil, image: nil, role: "learner", key: "r7z
x5awigj23", terms_and_conditions: false, honour_code: false, organisation_id: nil>, #<RSpec::Mocks::Mock:0x3ffb2bb4df14 @name=nil>)
expected: 1 time
received: 0 times
# ./spec/controllers/user_registrations_controller_spec.rb:79:in `block (3 levels) in <top (required)>'
8) UserRegistrationsController POST #create rejects unsanitized parameters
Failure/Error: User.should_receive(:register).with(user, invitation)
(<User(id: integer, first_name: string, last_name: string, email: string, created_at: datetime, updated_at: datetime, password_digest: string, short_description: text, locat
ion: string, image: string, role: string, key: string, terms_and_conditions: boolean, honour_code: boolean, organisation_id: integer) (class)>).register(#<User id: 0, first_name: n
il, last_name: nil, email: "user@example.com", created_at: nil, updated_at: nil, password_digest: nil, short_description: nil, location: nil, image: nil, role: "learner", key: "su0
eefu0fixy", terms_and_conditions: false, honour_code: false, organisation_id: nil>, #<RSpec::Mocks::Mock:0x3ffb2617a564 @name=nil>)
expected: 1 time
received: 0 times
# ./spec/controllers/user_registrations_controller_spec.rb:86:in `block (3 levels) in <top (required)>'
9) UserRegistrationsController POST #create when the user could not be created rerenders the new user form
Failure/Error: response.should render_template(:new) [66/228]
expecting <"new"> but rendering with <[]>
# ./spec/controllers/user_registrations_controller_spec.rb:129:in `block (4 levels) in <top (required)>'
10) UserRegistrationsController POST #create when the user could not be created alerts the user
Failure/Error: flash[:alert].should eql(I18n.t('registration.failure'))
expected: "We couldn't sign you up."
got: nil
(compared using eql?)
# ./spec/controllers/user_registrations_controller_spec.rb:145:in `block (4 levels) in <top (required)>'
11) UserRegistrationsController POST #create when the user is persisted signs the user in
Failure/Error: session['user_id'].should == user.id
expected: 0
got: 36 (using ==)
# ./spec/controllers/user_registrations_controller_spec.rb:98:in `block (4 levels) in <top (required)>'
12) UserRegistrationsController POST #create when the invitation has already been accepted redirects to sign-in with email address and flash alert
Failure/Error: response.should redirect_to(sign_in_path(email: email))
Expected response to be a <redirect>, but was <200>
# ./spec/controllers/user_registrations_controller_spec.rb:156:in `block (4 levels) in <top (required)>'
13) public access visiting profile page before site has gone public
Failure/Error: current_path.should eql(sign_in_path)
expected: "/sign-in"
got: "/profiles/80"
(compared using eql?)
# ./spec/features/public/public_access_spec.rb:38:in `block (2 levels) in <top (required)>'
14) ProfilesController as a learner GET #mark_inappropriate sends an email notification about the inappropriate profile
Failure/Error: patch :mark_inappropriate, id: '123'
ActionView::MissingTemplate:
Missing template profiles/mark_inappropriate, application/mark_inappropriate with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :haml]}. Searched in: [29/228]
* "#<RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator:0x007ff64c3bd8b0>"
# ./spec/controllers/profiles_controller_spec.rb:54:in `block (4 levels) in <top (required)>'
15) ProfilesController as a learner GET #mark_inappropriate when request is non-Ajax redirects back to the page where it came from
Failure/Error: patch :mark_inappropriate, id: '123'
ActionView::MissingTemplate:
Missing template profiles/mark_inappropriate, application/mark_inappropriate with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :haml]}. Searc
hed in:
* "#<RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator:0x007ff659d5eec0>"
# ./spec/controllers/profiles_controller_spec.rb:59:in `block (5 levels) in <top (required)>'
16) ProfilesController as a learner GET #mark_inappropriate when request is non-Ajax informs the user that the profile was marked as inappropriate
Failure/Error: patch :mark_inappropriate, id: '123'
ActionView::MissingTemplate:
Missing template profiles/mark_inappropriate, application/mark_inappropriate with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :haml]}. Searc
hed in:
* "#<RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator:0x007ff657408648>"
# ./spec/controllers/profiles_controller_spec.rb:64:in `block (5 levels) in <top (required)>'
17) ProfilesController as a learner GET #mark_inappropriate when request is Ajax renders JSON
Failure/Error: xhr :patch, :mark_inappropriate, id: '123'
ActionView::MissingTemplate:
Missing template profiles/mark_inappropriate, application/mark_inappropriate with {:locale=>[:en], :formats=>[:js, :html, :xml, :html, :text, :js, :css, :ics, :csv, :png, :j
peg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip], :handlers=>[:erb, :builder, :raw, :ruby, :haml]}. Searched in:
* "#<RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator:0x007ff654f569d0>"
# ./spec/controllers/profiles_controller_spec.rb:71:in `block (5 levels) in <top (required)>'
18) Interacting with learner profiles as a learner marking a learner profile as inappropriate should send email notification to admin
Failure/Error: page.should have_content 'Thanks, we will review this profile soon.'
expected to find text "Thanks, we will review this profile soon." in "[ALPHA] Fac Tory offensive-short-description 0 ACTIVITY 0 FOLLOWERS 0 FOLLOWING There are no comments $
o show yet. This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here"
# ./spec/features/interacting_with_learner_profiles_spec.rb:10:in `block (3 levels) in <top (required)>'
Finished in 2 minutes 25.3 seconds
2383 examples, 18 failures
Failed examples:
rspec ./spec/features/user_sessions_spec.rb:22 # session authentication inactive sessions expire after 48 hours
rspec ./spec/features/user_sessions_spec.rb:43 # session authentication selecting remember me keeps users signed in for two weeks
rspec ./spec/features/user_sessions_spec.rb:29 # session authentication accessing pages prevents sessions from expiring
rspec ./spec/controllers/user_registrations_controller_spec.rb:44 # UserRegistrationsController GET #new when the invitation exists but has already been accepted redirects to sign-
in with email address and flash alert
rspec ./spec/controllers/user_registrations_controller_spec.rb:28 # UserRegistrationsController GET #new when the invitation exists and has not yet been accepted makes the invitati
on available to the view
rspec ./spec/controllers/user_registrations_controller_spec.rb:33 # UserRegistrationsController GET #new when the invitation exists and has not yet been accepted makes a new user a
vailable to the view with the email address from the invitation
rspec ./spec/controllers/user_registrations_controller_spec.rb:77 # UserRegistrationsController POST #create creates the user with the given details
rspec ./spec/controllers/user_registrations_controller_spec.rb:84 # UserRegistrationsController POST #create rejects unsanitized parameters
rspec ./spec/controllers/user_registrations_controller_spec.rb:127 # UserRegistrationsController POST #create when the user could not be created rerenders the new user form
rspec ./spec/controllers/user_registrations_controller_spec.rb:143 # UserRegistrationsController POST #create when the user could not be created alerts the user
rspec ./spec/controllers/user_registrations_controller_spec.rb:96 # UserRegistrationsController POST #create when the user is persisted signs the user in
rspec ./spec/controllers/user_registrations_controller_spec.rb:154 # UserRegistrationsController POST #create when the invitation has already been accepted redirects to sign-in wit
h email address and flash alert
rspec ./spec/features/public/public_access_spec.rb:35 # public access visiting profile page before site has gone public
rspec ./spec/controllers/profiles_controller_spec.rb:51 # ProfilesController as a learner GET #mark_inappropriate sends an email notification about the inappropriate profile
rspec ./spec/controllers/profiles_controller_spec.rb:58 # ProfilesController as a learner GET #mark_inappropriate when request is non-Ajax redirects back to the page where it came
from
rspec ./spec/controllers/profiles_controller_spec.rb:63 # ProfilesController as a learner GET #mark_inappropriate when request is non-Ajax informs the user that the profile was mar
ked as inappropriate
rspec ./spec/controllers/profiles_controller_spec.rb:70 # ProfilesController as a learner GET #mark_inappropriate when request is Ajax renders JSON
rspec ./spec/features/interacting_with_learner_profiles_spec.rb:5 # Interacting with learner profiles as a learner marking a learner profile as inappropriate should send email noti
fication to admin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment