require 'rails_helper'

RSpec.describe "settings/order_queue_stations/index", type: :view do
  before(:each) do
    assign(:settings_order_queue_stations, [
      Settings::OrderQueueStation.create!(
        :station_name => "Station Name",
        :is_active => false,
        :processing_items => "",
        :print_copy => false,
        :printer_name => "Printer Name",
        :font_size => 2,
        :cut_per_item => false,
        :use_alternate_name => false,
        :created_by => "Created By"
      ),
      Settings::OrderQueueStation.create!(
        :station_name => "Station Name",
        :is_active => false,
        :processing_items => "",
        :print_copy => false,
        :printer_name => "Printer Name",
        :font_size => 2,
        :cut_per_item => false,
        :use_alternate_name => false,
        :created_by => "Created By"
      )
    ])
  end

  it "renders a list of settings/order_queue_stations" do
    render
    assert_select "tr>td", :text => "Station Name".to_s, :count => 2
    assert_select "tr>td", :text => false.to_s, :count => 2
    assert_select "tr>td", :text => "".to_s, :count => 2
    assert_select "tr>td", :text => false.to_s, :count => 2
    assert_select "tr>td", :text => "Printer Name".to_s, :count => 2
    assert_select "tr>td", :text => 2.to_s, :count => 2
    assert_select "tr>td", :text => false.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
