Sha256: c42441ab200216a07c186041f9f604ea1d403ce3ec3618a00c1ef77fe0275d3d

Contents?: true

Size: 1.1 KB

Versions: 29

Compression:

Stored size: 1.1 KB

Contents

require 'rails_helper'

describe "library_groups/edit" do
  before(:each) do
    @library_group = LibraryGroup.site_config
    @available_languages = Language.where(iso_639_1: I18n.available_locales.map{|l| l.to_s})
    @countries = Country.all
  end

  it "renders selector for multilpe book jacket sources." do
    render
    expect(rendered).to have_css "select#library_group_book_jacket_source"
    expect(rendered).to have_css "select#library_group_book_jacket_source option", minimum: 2
    expect(rendered).to have_css 'select#library_group_book_jacket_source option[value="google"]'
    expect(rendered).to have_css 'select#library_group_book_jacket_source option[value="openbd"]'
    expect(rendered).to have_css 'select#library_group_book_jacket_source option[value="hanmotocom"]'
  end

  it "renders color forms." do
    render
    expect(rendered).to have_css "input#library_group_colors_attributes_0_code"
    expect(rendered).not_to have_css "input#library_group_colors_attributes_0__destroy", visible: false
    expect(rendered).not_to have_xpath '//a[@data-association="color" and @class="add_fields"]'
  end
end

Version data entries

29 entries across 27 versions & 2 rubygems

Version Path
enju_library-0.3.11 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.10 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.9 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.8 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.8.rc.2 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.8.rc.1 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.4.0.rc.1 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.7 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.6 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.4.0.beta.4 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.4.0.beta.3 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.4.0.beta.2 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.4.0.beta.1 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.5 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.4 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.3 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.2 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.1 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.0 spec/views/library_groups/edit.html.erb_spec.rb
enju_library-0.3.0.rc.1 spec/views/library_groups/edit.html.erb_spec.rb