require 'spec_helper'


describe "fetprofiles/index" , :type=>:view do
foreach_theme do
  before(:each) do
#    default_url_options[:locale] = :de
    @fetprofile1 =  FactoryGirl.create(:fetprofile)
    @fetprofile2 =  FactoryGirl.create(:fetprofile2)
    @fetprofile3 =  FactoryGirl.create(:fetprofile3)
    @fetprofile4 =  FactoryGirl.create(:fetprofile_withadress)
    @fetprofiles=[@fetprofile1, @fetprofile2, @fetprofile3, @fetprofile4]
   assign(:fetprofiles,@fetprofiles)
     assign(:gremientabs, [])

  end

  it "renders a list of fetprofiles" do
    render
    expect(rendered).to match(/#{@fetprofile1.vorname}/)
    expect(rendered).to match(/#{@fetprofile1.nachname}/)
    expect(rendered).to match(/#{@fetprofile2.vorname}/)
    expect(rendered).to match(/#{@fetprofile2.nachname}/)
    expect(rendered).to match(/#{@fetprofile3.vorname}/)
    expect(rendered).to match(/#{@fetprofile3.nachname}/)
    expect(rendered).to match(/#{@fetprofile4.vorname}/)
    expect(rendered).to match(/#{@fetprofile4.nachname}/)
 #   expect(rendered).to have_tag("fetprofile_#{@fetprofile1.id}")
    
  end
end
end
