forked from bofh/fetsite
AutoCommit Mit Sep 2 23:03:01 CEST 2015
This commit is contained in:
@@ -1,28 +1,31 @@
|
||||
require 'spec_helper'
|
||||
|
||||
|
||||
describe "fetprofiles/index" do
|
||||
describe "fetprofiles/index" , :type=>:view 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]
|
||||
# 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}")
|
||||
|
||||
assert_select "tr>td", :text => "Vorname".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "Nachname".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "Short".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "Fetmailalias".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "Picture".to_s, :count => 2
|
||||
assert_select "tr>td", :text => false.to_s, :count => 2
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user