Files
fetsite/spec/views/fetprofiles/edit.html.erb_spec.rb
2015-09-03 16:03:01 +02:00

36 lines
1.6 KiB
Ruby

require 'spec_helper'
describe "fetprofiles/edit", :type=> :view do
foreach_theme do
login_fet_user
before(:each) do
@fetprofile = FactoryGirl.create(:fetprofile_withadress,:skype => "myskypename")
@memberships = []
end
it "renders the edit fetprofile form" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
expect(rendered).to have_tag('form', with: {method:"post"}) do
with_tag "input", with: {name: "fetprofile[vorname]", value: @fetprofile.vorname}
with_tag "input", with: {name: "fetprofile[nachname]", value: @fetprofile.nachname}
with_tag "input", with: {name: "fetprofile[short]", value: @fetprofile.short}
with_tag "textarea", with: {name: "fetprofile[desc]"}
with_tag "input", with: {name: "fetprofile[picture]"}
with_tag "input", with: {name: "fetprofile[picture_cache]"}
with_tag "input", with: {name: "fetprofile[street]", value: @fetprofile.street}
with_tag "input", with: {name: "fetprofile[plz]", value: @fetprofile.plz}
with_tag "input", with: {name: "fetprofile[city]", value: @fetprofile.city}
with_tag "input", with: {name: "fetprofile[hdynr]", value: @fetprofile.hdynr}
with_tag "input", with: {name: "fetprofile[telnr]", value: @fetprofile.telnr}
with_tag "input", with: {name: "fetprofile[skype]", value: @fetprofile.skype.to_s}
with_tag "input", with: {name: "fetprofile[birth_day]", value: @fetprofile.birth_day}
with_tag "input", with: {name: "fetprofile[birth_month]", value: @fetprofile.birth_month}
end
end
end
end