You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having cream in Gemfile and
in config/initializers/cream_and_rest_links.rb:
module Cream
def self.available_roles
[:user, :student, :curator, :instructor, :guest, :admin]
end
end
require 'cancan-rest-links/rails/configure'
require 'cream'
require 'cream/configure/rails'
...results in controllers aren't aware of current_user
sample spec
it "works! (now write some real specs)" do
visit(destroy_user_session_path)
login_as(@curator) # this doesn't set current_user as @curator!!!
get ptp_techniques_path # here, in the controller, current_user appears defined like guest !!!
...
end
Without Cream in Gemfile and in initializer all request specs pass_OK.
Looks like Cream overrides some Warden things needed for Warden test helpers.
Stanislaw
The text was updated successfully, but these errors were encountered:
It is again about RSpec requests tests.
I rely on
https://github.com/hassox/warden/wiki/testing and
https://gist.github.com/973983
Having cream in Gemfile and
in config/initializers/cream_and_rest_links.rb:
module Cream
def self.available_roles
[:user, :student, :curator, :instructor, :guest, :admin]
end
end
require 'cancan-rest-links/rails/configure'
require 'cream'
require 'cream/configure/rails'
...results in controllers aren't aware of current_user
Without Cream in Gemfile and in initializer all request specs pass_OK.
Looks like Cream overrides some Warden things needed for Warden test helpers.
Stanislaw
The text was updated successfully, but these errors were encountered: