require 'rails_helper'

RSpec.describe "settings/cashier_terminals/new", type: :view do
  before(:each) do
    assign(:settings_cashier_terminal, Settings::CashierTerminal.new(
      :name => "MyString",
      :is_active => false,
      :is_currently_login => false,
      :auto_print_receipt => "MyString",
      :printer_name => "MyString",
      :header => "",
      :footer => "",
      :font => "MyString",
      :font_size => "MyString",
      :show_tax => false,
      :show_cashier => false,
      :show_guest_info => false
    ))
  end

  it "renders new settings_cashier_terminal form" do
    render

    assert_select "form[action=?][method=?]", settings_cashier_terminals_path, "post" do

      assert_select "input#settings_cashier_terminal_name[name=?]", "settings_cashier_terminal[name]"

      assert_select "input#settings_cashier_terminal_is_active[name=?]", "settings_cashier_terminal[is_active]"

      assert_select "input#settings_cashier_terminal_is_currently_login[name=?]", "settings_cashier_terminal[is_currently_login]"

      assert_select "input#settings_cashier_terminal_auto_print_receipt[name=?]", "settings_cashier_terminal[auto_print_receipt]"

      assert_select "input#settings_cashier_terminal_printer_name[name=?]", "settings_cashier_terminal[printer_name]"

      assert_select "input#settings_cashier_terminal_header[name=?]", "settings_cashier_terminal[header]"

      assert_select "input#settings_cashier_terminal_footer[name=?]", "settings_cashier_terminal[footer]"

      assert_select "input#settings_cashier_terminal_font[name=?]", "settings_cashier_terminal[font]"

      assert_select "input#settings_cashier_terminal_font_size[name=?]", "settings_cashier_terminal[font_size]"

      assert_select "input#settings_cashier_terminal_show_tax[name=?]", "settings_cashier_terminal[show_tax]"

      assert_select "input#settings_cashier_terminal_show_cashier[name=?]", "settings_cashier_terminal[show_cashier]"

      assert_select "input#settings_cashier_terminal_show_guest_info[name=?]", "settings_cashier_terminal[show_guest_info]"
    end
  end
end
