Files
sx-fc/spec/views/settings/zones/index.html.erb_spec.rb
Min Zeya Phyo 0af7d78c3c scaffold models
2017-04-20 17:01:14 +06:30

26 lines
650 B
Ruby

require 'rails_helper'
RSpec.describe "settings/zones/index", type: :view do
before(:each) do
assign(:settings_zones, [
Settings::Zone.create!(
:name => "Name",
:is_active => false,
:created_by => "Created By"
),
Settings::Zone.create!(
:name => "Name",
:is_active => false,
:created_by => "Created By"
)
])
end
it "renders a list of settings/zones" do
render
assert_select "tr>td", :text => "Name".to_s, :count => 2
assert_select "tr>td", :text => false.to_s, :count => 2
assert_select "tr>td", :text => "Created By".to_s, :count => 2
end
end