Sha256: c885103e622da4e3210e0e0f04a3ec279d88447b41a4e35ea1334470be8c83ac

Contents?: true

Size: 1.59 KB

Versions: 21

Compression:

Stored size: 1.59 KB

Contents

# coding: utf-8
require File.dirname(__FILE__) + '/../spec_helper'

describe 'password input' do
  
  include FormtasticSpecHelper
  
  before do
    @output_buffer = ''
    mock_everything
    
    semantic_form_for(@new_post) do |builder|
      concat(builder.input(:title, :as => :password))
    end
  end

  it_should_have_input_wrapper_with_class(:password)
  it_should_have_input_wrapper_with_id("post_title_input")
  it_should_have_label_with_text(/Title/)
  it_should_have_label_for("post_title")
  it_should_have_input_with_id("post_title")
  it_should_have_input_with_type(:password)
  it_should_have_input_with_name("post[title]")
  it_should_have_maxlength_matching_column_limit
  it_should_use_default_text_field_size_for_columns_longer_than_default_text_field_size(:string)
  it_should_use_column_size_for_columns_shorter_than_default_text_field_size(:string)
  it_should_use_default_text_field_size_when_method_has_no_database_column(:string)
  it_should_apply_custom_input_attributes_when_input_html_provided(:string)
  it_should_apply_custom_for_to_label_when_input_html_id_provided(:string)
  it_should_apply_error_logic_for_input_type(:password)
  
  describe "when no object is provided" do
    before do
      semantic_form_for(:project, :url => 'http://test.host/') do |builder|
        concat(builder.input(:title, :as => :password))
      end
    end
    
    it_should_have_label_with_text(/Title/)
    it_should_have_label_for("project_title")
    it_should_have_input_with_id("project_title")
    it_should_have_input_with_type(:password)
    it_should_have_input_with_name("project[title]")
  end

end

Version data entries

21 entries across 21 versions & 4 rubygems

Version Path
formtastic-1.0.1 spec/inputs/password_input_spec.rb
formtastic-1.0.0 spec/inputs/password_input_spec.rb
formtastic-1.0.0.rc2 spec/inputs/password_input_spec.rb
formtastic-1.0.0.rc spec/inputs/password_input_spec.rb
formtastic-1.0.0.beta4 spec/inputs/password_input_spec.rb
formtastic-1.0.0.beta3 spec/inputs/password_input_spec.rb
formtastic-1.0.0.beta2 spec/inputs/password_input_spec.rb
formtastic-1.0.0.beta spec/inputs/password_input_spec.rb
formtastic-0.9.10 spec/inputs/password_input_spec.rb
formtastic-0.9.9 spec/inputs/password_input_spec.rb
formtastic-0.9.8 spec/inputs/password_input_spec.rb
jintastic-1.1.0 vendor/plugins/formtastic/spec/inputs/password_input_spec.rb
jintastic-1.0.2 vendor/plugins/formtastic/spec/inputs/password_input_spec.rb
tmayad-formtastic-0.9.7 spec/inputs/password_input_spec.rb
ShadowBelmolve-formtastic-0.9.7 spec/inputs/password_input_spec.rb
formtastic-0.9.7 spec/inputs/password_input_spec.rb
formtastic-0.9.6 spec/inputs/password_input_spec.rb
formtastic-0.9.5 spec/inputs/password_input_spec.rb
formtastic-0.9.4 spec/inputs/password_input_spec.rb
formtastic-0.9.3 spec/inputs/password_input_spec.rb