Sha256: 160ed2f033ccc64d47c6e00ec9de08eed9b1c0546d373a9e4abd51b5f69177c6

Contents?: true

Size: 1023 Bytes

Versions: 6

Compression:

Stored size: 1023 Bytes

Contents

require 'spec_helper'

describe "Users" do

  describe "signup" do

    describe "success" do

      it "should make a new user" do
        expect {
          visit signup_path
          fill_in "Name",         :with => "Example User"
          fill_in "Email",        :with => "user@example.com"
          fill_in "Password",     :with => "foobar"
          fill_in "Confirmation", :with => "foobar"
          click_button
          response.should render_template('users/show')
        }.to change(User, :count).by(1)
      end

      it "should print a welcome message" do
        visit signup_path
        fill_in "Name",         :with => "Example User"
        fill_in "Email",        :with => "user@example.com"
        fill_in "Password",     :with => "foobar"
        fill_in "Confirmation", :with => "foobar"
        click_button
        response.should have_selector("div.flash.notice",
                                      :content => "Welcome! You have signed up successfully.")
      end

    end


  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
tft_rails_dbc-0.1.3 lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb
tft_rails_dbc-0.1.1 lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb
tft_rails_dbc-0.1 lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb
tft_rails-0.6.2 lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb
tft_rails-0.6.1 lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb
tft_rails-0.6.0 lib/generators/chapter08_09/begin/templates/spec/requests/users_signup_08_spec.rb