initial print setup

This commit is contained in:
Yan
2017-06-02 16:22:15 +06:30
parent 98a7c31ffa
commit 022a2e005f
24 changed files with 663 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
require 'rails_helper'
RSpec.describe "print_settings/show", type: :view do
before(:each) do
@print_setting = assign(:print_setting, PrintSetting.create!(
:name, => "Name,",
:unique_code, => "Unique Code,",
:template, => "Template,",
:db_name, => "Db Name,",
:db_type, => "Db Type,",
:db_username, => "Db Username,",
:db_password, => "Db Password,",
:printer_name, => "Printer Name,",
:api_settings, => "Api Settings,",
:page_width => "",
:page_height => "",
:print_copies => 2
))
end
it "renders attributes in <p>" do
render
expect(rendered).to match(/Name,/)
expect(rendered).to match(/Unique Code,/)
expect(rendered).to match(/Template,/)
expect(rendered).to match(/Db Name,/)
expect(rendered).to match(/Db Type,/)
expect(rendered).to match(/Db Username,/)
expect(rendered).to match(/Db Password,/)
expect(rendered).to match(/Printer Name,/)
expect(rendered).to match(/Api Settings,/)
expect(rendered).to match(//)
expect(rendered).to match(//)
expect(rendered).to match(/2/)
end
end