forked from bofh/fetsite
New Feature: Themen/Informationen
This commit is contained in:
18
spec/views/attachments/edit.html.erb_spec.rb
Normal file
18
spec/views/attachments/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "attachments/edit" do
|
||||
before(:each) do
|
||||
@attachment = assign(:attachment, stub_model(Attachment,
|
||||
:name => "MyString"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders the edit attachment form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", attachment_path(@attachment), "post" do
|
||||
assert_select "input#attachment_name[name=?]", "attachment[name]"
|
||||
end
|
||||
end
|
||||
end
|
||||
20
spec/views/attachments/index.html.erb_spec.rb
Normal file
20
spec/views/attachments/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "attachments/index" do
|
||||
before(:each) do
|
||||
assign(:attachments, [
|
||||
stub_model(Attachment,
|
||||
:name => "Name"
|
||||
),
|
||||
stub_model(Attachment,
|
||||
:name => "Name"
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of attachments" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "tr>td", :text => "Name".to_s, :count => 2
|
||||
end
|
||||
end
|
||||
18
spec/views/attachments/new.html.erb_spec.rb
Normal file
18
spec/views/attachments/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,18 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "attachments/new" do
|
||||
before(:each) do
|
||||
assign(:attachment, stub_model(Attachment,
|
||||
:name => "MyString"
|
||||
).as_new_record)
|
||||
end
|
||||
|
||||
it "renders new attachment form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", attachments_path, "post" do
|
||||
assert_select "input#attachment_name[name=?]", "attachment[name]"
|
||||
end
|
||||
end
|
||||
end
|
||||
15
spec/views/attachments/show.html.erb_spec.rb
Normal file
15
spec/views/attachments/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "attachments/show" do
|
||||
before(:each) do
|
||||
@attachment = assign(:attachment, stub_model(Attachment,
|
||||
:name => "Name"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
rendered.should match(/Name/)
|
||||
end
|
||||
end
|
||||
20
spec/views/fragen/edit.html.erb_spec.rb
Normal file
20
spec/views/fragen/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fragen/edit" do
|
||||
before(:each) do
|
||||
@frage = assign(:frage, stub_model(Frage,
|
||||
:title => "MyString",
|
||||
:text => "MyText"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders the edit frage form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", frage_path(@frage), "post" do
|
||||
assert_select "input#frage_title[name=?]", "frage[title]"
|
||||
assert_select "textarea#frage_text[name=?]", "frage[text]"
|
||||
end
|
||||
end
|
||||
end
|
||||
23
spec/views/fragen/index.html.erb_spec.rb
Normal file
23
spec/views/fragen/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fragen/index" do
|
||||
before(:each) do
|
||||
assign(:fragen, [
|
||||
stub_model(Frage,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
),
|
||||
stub_model(Frage,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of fragen" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "tr>td", :text => "Title".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
||||
end
|
||||
end
|
||||
20
spec/views/fragen/new.html.erb_spec.rb
Normal file
20
spec/views/fragen/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fragen/new" do
|
||||
before(:each) do
|
||||
assign(:frage, stub_model(Frage,
|
||||
:title => "MyString",
|
||||
:text => "MyText"
|
||||
).as_new_record)
|
||||
end
|
||||
|
||||
it "renders new frage form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", fragen_path, "post" do
|
||||
assert_select "input#frage_title[name=?]", "frage[title]"
|
||||
assert_select "textarea#frage_text[name=?]", "frage[text]"
|
||||
end
|
||||
end
|
||||
end
|
||||
17
spec/views/fragen/show.html.erb_spec.rb
Normal file
17
spec/views/fragen/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "fragen/show" do
|
||||
before(:each) do
|
||||
@frage = assign(:frage, stub_model(Frage,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
rendered.should match(/Title/)
|
||||
rendered.should match(/MyText/)
|
||||
end
|
||||
end
|
||||
20
spec/views/themen/edit.html.erb_spec.rb
Normal file
20
spec/views/themen/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themen/edit" do
|
||||
before(:each) do
|
||||
@thema = assign(:thema, stub_model(Thema,
|
||||
:title => "MyString",
|
||||
:text => "MyText"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders the edit thema form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", thema_path(@thema), "post" do
|
||||
assert_select "input#thema_title[name=?]", "thema[title]"
|
||||
assert_select "textarea#thema_text[name=?]", "thema[text]"
|
||||
end
|
||||
end
|
||||
end
|
||||
23
spec/views/themen/index.html.erb_spec.rb
Normal file
23
spec/views/themen/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themen/index" do
|
||||
before(:each) do
|
||||
assign(:themen, [
|
||||
stub_model(Thema,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
),
|
||||
stub_model(Thema,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of themen" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "tr>td", :text => "Title".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
||||
end
|
||||
end
|
||||
20
spec/views/themen/new.html.erb_spec.rb
Normal file
20
spec/views/themen/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themen/new" do
|
||||
before(:each) do
|
||||
assign(:thema, stub_model(Thema,
|
||||
:title => "MyString",
|
||||
:text => "MyText"
|
||||
).as_new_record)
|
||||
end
|
||||
|
||||
it "renders new thema form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", themen_path, "post" do
|
||||
assert_select "input#thema_title[name=?]", "thema[title]"
|
||||
assert_select "textarea#thema_text[name=?]", "thema[text]"
|
||||
end
|
||||
end
|
||||
end
|
||||
17
spec/views/themen/show.html.erb_spec.rb
Normal file
17
spec/views/themen/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themen/show" do
|
||||
before(:each) do
|
||||
@thema = assign(:thema, stub_model(Thema,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
rendered.should match(/Title/)
|
||||
rendered.should match(/MyText/)
|
||||
end
|
||||
end
|
||||
20
spec/views/themengruppen/edit.html.erb_spec.rb
Normal file
20
spec/views/themengruppen/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themengruppen/edit" do
|
||||
before(:each) do
|
||||
@themengruppe = assign(:themengruppe, stub_model(Themengruppe,
|
||||
:title => "MyString",
|
||||
:text => "MyText"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders the edit themengruppe form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", themengruppe_path(@themengruppe), "post" do
|
||||
assert_select "input#themengruppe_title[name=?]", "themengruppe[title]"
|
||||
assert_select "textarea#themengruppe_text[name=?]", "themengruppe[text]"
|
||||
end
|
||||
end
|
||||
end
|
||||
23
spec/views/themengruppen/index.html.erb_spec.rb
Normal file
23
spec/views/themengruppen/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themengruppen/index" do
|
||||
before(:each) do
|
||||
assign(:themengruppen, [
|
||||
stub_model(Themengruppe,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
),
|
||||
stub_model(Themengruppe,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of themengruppen" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "tr>td", :text => "Title".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
||||
end
|
||||
end
|
||||
20
spec/views/themengruppen/new.html.erb_spec.rb
Normal file
20
spec/views/themengruppen/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,20 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themengruppen/new" do
|
||||
before(:each) do
|
||||
assign(:themengruppe, stub_model(Themengruppe,
|
||||
:title => "MyString",
|
||||
:text => "MyText"
|
||||
).as_new_record)
|
||||
end
|
||||
|
||||
it "renders new themengruppe form" do
|
||||
render
|
||||
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
assert_select "form[action=?][method=?]", themengruppen_path, "post" do
|
||||
assert_select "input#themengruppe_title[name=?]", "themengruppe[title]"
|
||||
assert_select "textarea#themengruppe_text[name=?]", "themengruppe[text]"
|
||||
end
|
||||
end
|
||||
end
|
||||
17
spec/views/themengruppen/show.html.erb_spec.rb
Normal file
17
spec/views/themengruppen/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,17 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe "themengruppen/show" do
|
||||
before(:each) do
|
||||
@themengruppe = assign(:themengruppe, stub_model(Themengruppe,
|
||||
:title => "Title",
|
||||
:text => "MyText"
|
||||
))
|
||||
end
|
||||
|
||||
it "renders attributes in <p>" do
|
||||
render
|
||||
# Run the generator again with the --webrat flag if you want to use webrat matchers
|
||||
rendered.should match(/Title/)
|
||||
rendered.should match(/MyText/)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user