Sha256: c15817080eef57a64c1750471fc35e9b1f436c7ee53ce84fc19601248689f106

Contents?: true

Size: 1016 Bytes

Versions: 8

Compression:

Stored size: 1016 Bytes

Contents

# encoding: utf-8
require "spec_helper"

describe "JS behaviour", :js => true do
  before do
    @user = User.new :name => "Lucia",
      :last_name => "Napoli",
      :email => "lucianapoli@gmail.com",
      :height => "5' 5\"",
      :address => "Via Roma 99",
      :zip => "25123",
      :country => "2",
      :receive_email => false,
      :description => "User description"
  end

  it "should be able to use bip_text to update a text area" do
    @user.save!
    visit user_path(@user)
    within("#description") do
      page.should have_content("User description")
    end

    bip_area @user, :description, "A new description"

    visit user_path(@user)
    within("#description") do
      page.should have_content("A new description")
    end
  end

  it "should be able to use a bip_text with :display_with option" do
    @user.description = "I'm so awesome"
    @user.save!
    visit user_path(@user)
    within("#dw_description") do
      page.should have_content("I'm so awesome")
    end
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
very_best_in_place-2.0.3 spec/integration/text_area_spec.rb
crest_in_place-2.2.0 spec/integration/text_area_spec.rb
best_in_place-2.1.0 spec/integration/text_area_spec.rb
best_in_place-2.0.3 spec/integration/text_area_spec.rb
best_in_place-2.0.2 spec/integration/text_area_spec.rb
best_in_place-2.0.1 spec/integration/text_area_spec.rb
best_in_place-2.0.0 spec/integration/text_area_spec.rb
best_in_place-1.1.3 spec/integration/text_area_spec.rb