Sha256: 8829521926f2f42e61e8d8349a1e6a6e7fd386ce4cc729e88ad9d655b640ea48

Contents?: true

Size: 723 Bytes

Versions: 4

Compression:

Stored size: 723 Bytes

Contents

require 'spec_helper'

describe "spotlight/contacts/edit.html.erb" do
  let(:exhibit) { FactoryGirl.create(:exhibit) }

  let(:contact) do
    Spotlight::Contact.new exhibit: exhibit
  end

  before do
    allow(view).to receive(:exhibit_contacts_path).and_return("/exhibit/1/contacts")
    allow(view).to receive(:exhibit_about_pages_path).and_return("/exhibit/admin/about")
    assign(:contact, contact)
    assign(:exhibit, exhibit)
    allow(view).to receive(:current_exhibit).and_return(exhibit)
  end

  it "should have a photo field" do
    render
    expect(rendered).to have_content "Photo"
  end

  it "should have a cropbox" do
    render
    expect(rendered).to have_selector "#contact_avatar_cropbox"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
blacklight-spotlight-0.4.1 spec/views/spotlight/contacts/edit.html.erb_spec.rb
blacklight-spotlight-0.3.1 spec/views/spotlight/contacts/edit.html.erb_spec.rb
blacklight-spotlight-0.3.0 spec/views/spotlight/contacts/edit.html.erb_spec.rb
blacklight-spotlight-0.2.0 spec/views/spotlight/contacts/edit.html.erb_spec.rb