forked from bofh/fetsite
AutoCommit Mit Sep 2 22:03:01 CEST 2015
This commit is contained in:
@@ -11,6 +11,15 @@ FactoryGirl.define do
|
||||
active false
|
||||
birth_month 4
|
||||
birth_day 2
|
||||
factory :fetprofile2 do
|
||||
vorname "Sarah"
|
||||
nachname "Nachname2"
|
||||
short "j"
|
||||
end
|
||||
factory :fetprofile3 do
|
||||
vorname "Thomas"
|
||||
nachname "Mustermann"
|
||||
end
|
||||
factory :fetprofile_withadress do
|
||||
street "some street"
|
||||
plz "1231"
|
||||
|
||||
@@ -1,32 +1,22 @@
|
||||
require 'spec_helper'
|
||||
|
||||
|
||||
describe "fetprofiles/index" do
|
||||
|
||||
before(:each) do
|
||||
assign(:fetprofiles, [
|
||||
stub_model(Fetprofile,
|
||||
:vorname => "Vorname",
|
||||
:nachname => "Nachname",
|
||||
:short => "Short",
|
||||
:fetmailalias => "Fetmailalias",
|
||||
:desc => "MyText",
|
||||
:picture => "Picture",
|
||||
:active => false
|
||||
),
|
||||
stub_model(Fetprofile,
|
||||
:vorname => "Vorname",
|
||||
:nachname => "Nachname",
|
||||
:short => "Short",
|
||||
:fetmailalias => "Fetmailalias",
|
||||
:desc => "MyText",
|
||||
:picture => "Picture",
|
||||
:active => false
|
||||
)
|
||||
])
|
||||
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)
|
||||
|
||||
end
|
||||
|
||||
it "renders a list of fetprofiles" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user