Displaying 5 results from an estimated 5 matches for "signin_path".
2013 Jan 09
2
Rails 3.2.10 and Rspec Tests that Fail?
...following tests in(I am only showing the first two tests):
spec/features/authentication_pages_spec.rb
require ''spec_helper''
describe "Authentication" do
subject { page }
describe "signin" do
before { visit signin_path }
it { should have_selector(''h2'', text: ''Sign in'') }
it { should have_selector(''title'', text: ''Sign in'') }
...
...
end
The first test passes, that...
2012 Feb 18
0
Rails NameError : uninitialized constant RelationshipsController
...Here''s the code for my relationships_controller_spec.rb file:
require ''spec_helper''
describe RelationshipsController do
describe "access control" do
it "should require signin for create" do
post :create
response.should redirect_to(signin_path)
end
it "should require signin for destroy" do
delete :destroy, :id => 1
response.should redirect_to(signin_path)
end
end
describe "POST ''create''" do
before(:each) do
@user = test_sign_in(Factory(:user))
@follow...
2012 Jun 08
0
Having difficulty testing redirects with Rspec and Capybara
..."acme") }
describe "Admin::Accounts#show" do
context "as non-signed in user" do
before do
visit admin_account_url(account, host: get_host(account))
end
it "should redirect to the login page" do
assert_redirected_to signin_path
end
end
end
end
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/Wxi7Un4Qq4QJ.
To post to this group, send email to rubyonrail...
2012 Dec 03
2
Stop User from Changing URL
...ore_filter :signed_in_employee, only:
[:index, :edit, :update]
before_filter :correct_employee, only:
[:edit, :update]
etc
etc
private
def signed_in_employee
unless signed_in?
store_location
redirect_to signin_path, notice:
"Please sign in to access this page."
end
end
def correct_employee
@employee = Employee.find(params[:id])
redirect_to(root_path) unless current_employee?
(@employee)
end
def admin_employee...
2012 Jul 17
24
Static Pages from Railcast
Hi everyone,
I need several pages to be static but also modify when requested. I try
following the railcast from Ryan at
http://railscasts.com/episodes/117-semi-static-pages?view=comments
Here what I have done!!
rails g scaffold Pages name:string permanentlink:string title:string
author:string access_level:string is_published:boolean
meta_description:string meta_keyword:string