32 lines
898 B
Ruby
Executable File
32 lines
898 B
Ruby
Executable File
require 'rails_helper'
|
|
|
|
RSpec.describe "settings/tax_profiles/index", type: :view do
|
|
before(:each) do
|
|
assign(:settings_tax_profiles, [
|
|
Settings::TaxProfile.create!(
|
|
:name => "Name",
|
|
:rate => "9.99",
|
|
:inclusive => false,
|
|
:order_by => 2,
|
|
:created_by => "Created By"
|
|
),
|
|
Settings::TaxProfile.create!(
|
|
:name => "Name",
|
|
:rate => "9.99",
|
|
:inclusive => false,
|
|
:order_by => 2,
|
|
:created_by => "Created By"
|
|
)
|
|
])
|
|
end
|
|
|
|
it "renders a list of settings/tax_profiles" do
|
|
render
|
|
assert_select "tr>td", :text => "Name".to_s, :count => 2
|
|
assert_select "tr>td", :text => "9.99".to_s, :count => 2
|
|
assert_select "tr>td", :text => false.to_s, :count => 2
|
|
assert_select "tr>td", :text => 2.to_s, :count => 2
|
|
assert_select "tr>td", :text => "Created By".to_s, :count => 2
|
|
end
|
|
end
|