Displaying 20 results from an estimated 60000 matches similar to: "test examples using authlogic with shoulda"
2012 Feb 21
2
API Authentication-Authlogic
Hi all
I am using Authlogic gem for authentication.I want an API
authentication for external API(XML) call.How to implement this in
authlogic .Thanks in advance...
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To
2010 Dec 15
2
skip password validation in authlogic
i am using authlogic for user authentication and authlogic-connect for
facebook and twitter signup.what i need is that i need to skip
validation on the password field if user is signup via facebook or
twitter.my environment is rails 3 and ruby 1.9.2.
i have acts_as_authentic in my user model.however i can skip phone
number validation like this
validates :phone_number, :numericality =>
2010 Dec 22
8
Shoulda issue: no more "should have_instance_methods" ?
I''m using Shoulda.
After copying the code here....
.... http://joshuaclayton.github.com/code/2009/07/14/should-act-as-list.html....
into my test_helper file so I can test acts_as_list, I came across
issues. For one I realized I had to get rid of the _ between the
"should" and "have" in past cases, but here, I get this error when I
run my unit test:
2010 Feb 05
1
Encrypting the password using Authlogic
Hi,
I am using "Authlogic" for user authentication.
I have a excel file into which I have user deatils. I have to migrate
those details to the "users" table. For that I have written a script
which goes through the excel file and store the data into "users" table.
My code is like this:-
user=User.new
user.password="password"
2011 Jun 16
2
Authlogic: Trying to login in my Cucumber test - Authlogic::Session::Activation::NotActivatedError
In a Cucumber step definition, I''m trying to login, but I keep getting
this error:
You must activate the Authlogic::Session::Base.controller with a
controller object before creating objects
(Authlogic::Session::Activation::NotActivatedError)
My code:
Given /^I am the logged in (.+) "(.+)"$/ do |role, login|
user = User.create!(
:login => login,
:password =>
2011 Jun 30
2
How to play with shoulda with functional testing
Hi,
I am new in rails testing, and now i try to use shoulda to test the
functional section.
can anyone give me some advice, example or recommend tutorial site to
me..
thanks
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To
2010 Dec 02
7
Rails 3 + Authlogic not working all of a sudden
Hey People,
I''ve been working on Rails 3.0.0 and Authlogic for quite a while now but
all of a sudden I can''t login into my application anymore.
After some research I found out that no sessions are stored into the db
anymore so I started the console and saw this:
ruby-1.9.2-p0 > u = UserSession.new({:username => ''Test'', :password =>
2010 Oct 21
4
Authlogic + Rails3 - undefined method `Login' for nil:NilClass
Im new to Rails, and decided to start of with Rails3. After a lot of
searching ive managed to get a little bit of Authlogic working. I''m able
to register a user, login & logout.
Now, I would like to add more features, get more of authlogic working.
I''m using Railscast EP 160 as my reference.
Portions of the code found on the tutorial throw errors: Eg:
<!--
2011 Oct 15
0
shoulda installation troubles
I cannot manage to have shoulda working.
I''m using rvm with rails 3.1 and ruby 1.9.2
I added
group :test do
gem "shoulda"
end
to the Gemfile, and then run bundle install, thus the gem is installed,
and it is featured in the list running gem list --local.
but whenever I add something like
class ModelTest < Test::Unit::TestCase
should_not
2011 Feb 21
1
authlogic problem
I can''t get authlogic to work.
(https://github.com/binarylogic/authlogic)
i''ve installed it,
i''ve put the following in environment.rb:
config.gem "authlogic"
''gem list'' gives:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.3, 2.0.2)
actionpack (3.0.3, 2.0.2)
activemodel (3.0.3)
activerecord (3.0.3, 2.0.2)
activeresource (3.0.3,
2013 Sep 07
0
[shoulda-matchers gem] validate_numericality_of_matcher strange behaviour
Hello
I have Vacancy model and vacancy_spec test with validates_numericality_of
:salary, greater_than: 1 in the model and
validate_numericality_of(:salary).is_greater_than(2) in the _spec.
When i run rspec spec command tests pass (in some cases and in other they
don''t)
Why?
vacancy.rb
------------------------
class Vacancy < ActiveRecord::Base
validates_presence_of :name,
2010 Jul 15
2
Authlogic admin user functionality
I am using authlogic as a authentication engine in my rails app.
I have two types of users 1) Users who are registered and has access
to there own profile.
2) Admin user who has access to everybody''s profile
In the user table i have a :is_admin field boolean field which defines
the admin user.
like the current_user method, Is there a way authlogic provides which
can tell me if the
2010 Feb 04
2
Encrypt a user password using "Authlogic"
Hi,
I have a csv file which have the user detail. I want to migrate this
information into the "users" table.
My application use "Authlogic" for user aunthentication so I have to
encrypt the password during migration. I have written the script which
is reading the csv file and adds the record into "users" table, it is
working fine. But I am not able to encrypt the
2010 May 29
1
Authlogic & Perishable token
Hi
I''m setting up authlogic and have an error:
Column ''perishable_token'' cannot be null
.....
.....
Does anyone know what should generate value for this column?
Thanks in advance!
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send
2010 Nov 07
1
Strange authlogic logout behavior
I am using authlogic for my application''s authentication. If I decide
to login with an account and then immediately logout, I get an error.
Unknown action
The action ''show'' could not be found for UserSessionsController
The server log in development says:
Started GET "/user_session" for 127.0.0.1 at Sun Nov 07 13:28:31 -0800
2010
2010 Aug 01
1
authlogic and controlling the resources users can access
question re authlogic, all set up but now i''d ike to control access to a
resource so only users who own that resource can control it, I figure I
put this in the Advert controller - is this approach sound ?
http://pastie.org/1069488
I also specify that an admin (just a boolean controlled user) can edit
everything... is it good ?
User, has many Adverts and Advert belongs to a User
Just
2010 Oct 30
3
Authlogic not active
Trying to add authlogic in a simple project but get the error;
Showing app/views/layouts/application.html.erb where line #33 raised:
undefined method `underscore'' for nil:NilClass
Extracted source (around line #33):
30: <div id="mainleft">
31: <ul class="menu">
32: <li><%= nav_link "Home", "site", "index"
2010 May 25
2
Rails 2.3.6 and Authlogic 2.1.4 or 2.1.3
In the test environment, logging out and back in is not working for me. The
log for the first login looks like this:
Processing UserSessionsController#create (for 127.0.0.1 at 2010-05-24 19:53:57) [POST]
Parameters: {"user_session"=>{"remember_me"=>"true", "password"=>"[FILTERED]", "login"=>"test"},
2011 Aug 22
0
Authlogic and Authlogic-OID Question
Hello,I was wondering if anyone was using these and if so, hopefully you
could explain something to me.
When User::create is called when using an open_id, User::create gets called
twice and the second call clears out the session.
The first call to User::create deletes a row from
open_id_authentication_associations and then inserts a new row into the same
table. It then sets up the request to
2009 Nov 17
2
rake db:seed with authlogic fails to populate users
I have a db/seeds.rb file that I want to load, but while the rest of the
seeds file works fine, nothing is ever populated in :users. I just fails
silently, so I can''t figure out what exactly is causing the problem.
I have authlogic installed into the user.rb model with
acts_as_authentic. I''m sure that''s part of the problem, but I''m not sure
that manually