Sha256: 69f082be0dba7d4d1bdbeef6daed23a5d5057bcfdbeee2ae94666c8cf4b660cf
Contents?: true
Size: 1.1 KB
Versions: 15
Compression:
Stored size: 1.1 KB
Contents
# Copyright (c) 2008-2013 Michael Dvorkin and contributors. # # Fat Free CRM is freely distributable under the terms of MIT license. # See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php #------------------------------------------------------------------------------ require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') describe "/authentications/new" do include AuthenticationsHelper before do activate_authlogic assign(:authentication, @authentication = Authentication.new) end it "renders the login form without signup link" do expect(view).to receive(:can_signup?).and_return(false) render expect(rendered).to have_tag("form[action='#{authentication_path}'][class=new_authentication]") expect(rendered).not_to have_tag("a[href='#{signup_path}']") end it "renders the login form with signup link" do expect(view).to receive(:can_signup?).and_return(true) render expect(rendered).to have_tag("form[action='#{authentication_path}'][class=new_authentication]") expect(rendered).to have_tag("a[href='#{signup_path}']") end end
Version data entries
15 entries across 15 versions & 2 rubygems