Module: Refinery::Testing::RequestMacros::Authentication
- Defined in:
- lib/refinery/testing/request_macros/authentication.rb
Instance Method Summary collapse
- #login_refinery_superuser ⇒ Object
- #login_refinery_translator ⇒ Object
- #login_refinery_user ⇒ Object
Instance Method Details
#login_refinery_superuser ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/refinery/testing/request_macros/authentication.rb', line 24 def login_refinery_superuser before(:each) do password = '123456' refinery_superuser = FactoryGirl.create(:refinery_superuser, { :username => "refinerycms", :password => password, :password_confirmation => password, :email => "[email protected]" }) visit refinery.new_refinery_user_session_path fill_in "Login", :with => refinery_superuser.username fill_in "Password", :with => password "Sign in" end end |
#login_refinery_translator ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/refinery/testing/request_macros/authentication.rb', line 43 def login_refinery_translator before do password = '123456' FactoryGirl.create(:refinery_user) user = FactoryGirl.create(:refinery_translator, { :password => password, :password_confirmation => password }) visit refinery.new_refinery_user_session_path fill_in "Login", :with => user.username fill_in "Password", :with => password "Sign in" end end |
#login_refinery_user ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/refinery/testing/request_macros/authentication.rb', line 5 def login_refinery_user before do password = '123456' refinery_user = FactoryGirl.create(:refinery_user, { :username => "refinerycms", :password => password, :password_confirmation => password, :email => "[email protected]" }) visit refinery.new_refinery_user_session_path fill_in "Login", :with => refinery_user.username fill_in "Password", :with => password "Sign in" end end |