forked from bofh/fetsite
AutoCommit Don Jul 30 00:03:02 CEST 2015
This commit is contained in:
25
spec/views/survey/questions/index.html.erb_spec.rb
Normal file
25
spec/views/survey/questions/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe "survey/questions/index", :type => :view do
|
||||
before(:each) do
|
||||
assign(:survey_questions, [
|
||||
Survey::Question.create!(
|
||||
:title => "Title",
|
||||
:text => "MyText",
|
||||
:typ => 1
|
||||
),
|
||||
Survey::Question.create!(
|
||||
:title => "Title",
|
||||
:text => "MyText",
|
||||
:typ => 1
|
||||
)
|
||||
])
|
||||
end
|
||||
|
||||
it "renders a list of survey/questions" do
|
||||
render
|
||||
assert_select "tr>td", :text => "Title".to_s, :count => 2
|
||||
assert_select "tr>td", :text => "MyText".to_s, :count => 2
|
||||
assert_select "tr>td", :text => 1.to_s, :count => 2
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user