Sha256: 964bf069916f4a15a30c275a4fac26cde7d9f0f408c39f0af34f76db2136a21e

Contents?: true

Size: 701 Bytes

Versions: 14

Compression:

Stored size: 701 Bytes

Contents

require 'spec_helper'

describe "users/new" do
  fixtures :user_groups

  before(:each) do
    assign(:user, stub_model(User,
      :username => "MyString"
    ).as_new_record)
    assign(:user_groups, UserGroup.all)
    assign(:libraries, Library.all)
    assign(:roles, Role.all)
    assign(:available_languages, Language.available_languages)
    view.stub(:current_user).and_return(User.find('admin'))
  end

  it "renders new user form" do
    render

    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "form", :action => users_path, :method => "post" do
      assert_select "input#user_username", :name => "user[username]"
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
enju_leaf-1.1.0.rc12 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc11 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc10 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc9 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc8 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc7 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc6 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc5 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc4 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc3 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc2 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.rc1 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.beta3 spec/views/users/new.html.erb_spec.rb
enju_leaf-1.1.0.pre3 spec/views/users/new.html.erb_spec.rb