commissioner scaffold
This commit is contained in:
213
.idea/workspace.xml
generated
213
.idea/workspace.xml
generated
@@ -2,11 +2,31 @@
|
|||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
|
<list default="true" id="89ca96af-a0e4-4fe4-b9a3-9969f22d7079" name="Default" comment="">
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.gitignore" afterPath="$PROJECT_DIR$/.gitignore" />
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/assets/javascripts/commissioners.coffee" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/assets/stylesheets/commissioners.scss" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/controllers/commissioners_controller.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/helpers/commissioners_helper.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/models/commissioner.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/_commissioner.json.jbuilder" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/_form.html.erb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/edit.html.erb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/index.html.erb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/index.json.jbuilder" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/new.html.erb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/show.html.erb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/app/views/commissioners/show.json.jbuilder" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/controllers/commissioners_controller_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/helpers/commissioners_helper_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/models/commissioner_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/requests/commissioners_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/routing/commissioners_routing_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/edit.html.erb_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/index.html.erb_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/new.html.erb_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/spec/views/commissioners/show.html.erb_spec.rb" />
|
||||||
|
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/test/system/commissioners_test.rb" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" afterPath="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/models/sale.rb" afterPath="$PROJECT_DIR$/app/models/sale.rb" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb" afterPath="$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb" />
|
|
||||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/routes.rb" afterPath="$PROJECT_DIR$/config/routes.rb" />
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/config/routes.rb" afterPath="$PROJECT_DIR$/config/routes.rb" />
|
||||||
</list>
|
</list>
|
||||||
<ignored path="$PROJECT_DIR$/.bundle/" />
|
<ignored path="$PROJECT_DIR$/.bundle/" />
|
||||||
@@ -21,52 +41,53 @@
|
|||||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||||
<component name="FileEditorManager">
|
<component name="FileEditorManager">
|
||||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||||
<file leaf-file-name="sale_edit_controller.rb" pinned="false" current-in-tab="false">
|
<file leaf-file-name="20170818090115_create_commissioners.rb" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb">
|
<entry file="file://$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="372">
|
<state relative-caret-position="144">
|
||||||
<caret line="40" column="60" lean-forward="true" selection-start-line="40" selection-start-column="60" selection-end-line="40" selection-end-column="60" />
|
<caret line="8" column="18" lean-forward="true" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name=".gitignore" pinned="false" current-in-tab="true">
|
<file leaf-file-name="20170403155230_create_employees.rb" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
<entry file="file://$PROJECT_DIR$/db/migrate/20170403155230_create_employees.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="254">
|
<state relative-caret-position="126">
|
||||||
<caret line="51" column="8" lean-forward="true" selection-start-line="51" selection-start-column="8" selection-end-line="51" selection-end-column="8" />
|
<caret line="7" column="28" lean-forward="false" selection-start-line="7" selection-start-column="28" selection-end-line="7" selection-end-column="28" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="sale.rb" pinned="false" current-in-tab="false">
|
<file leaf-file-name="commissioners_controller.rb" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/app/models/sale.rb">
|
<entry file="file://$PROJECT_DIR$/app/controllers/commissioners_controller.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="321">
|
<state relative-caret-position="54">
|
||||||
<caret line="270" column="45" lean-forward="true" selection-start-line="270" selection-start-column="45" selection-end-line="270" selection-end-column="45" />
|
<caret line="48" column="88" lean-forward="true" selection-start-line="48" selection-start-column="88" selection-end-line="48" selection-end-column="88" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="edit.html.erb" pinned="false" current-in-tab="false">
|
<file leaf-file-name="commissioner.rb" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb">
|
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="213">
|
<state relative-caret-position="0">
|
||||||
<caret line="58" column="112" lean-forward="false" selection-start-line="58" selection-start-column="112" selection-end-line="58" selection-end-column="112" />
|
<caret line="0" column="38" lean-forward="true" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="routes.rb" pinned="false" current-in-tab="false">
|
<file leaf-file-name="routes.rb" pinned="false" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="204">
|
<state relative-caret-position="126">
|
||||||
<caret line="83" column="43" lean-forward="false" selection-start-line="83" selection-start-column="43" selection-end-line="83" selection-end-column="43" />
|
<caret line="83" column="43" lean-forward="false" selection-start-line="83" selection-start-column="43" selection-end-line="83" selection-end-column="43" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
@@ -105,10 +126,12 @@
|
|||||||
<option value="$PROJECT_DIR$/app/models/ability.rb" />
|
<option value="$PROJECT_DIR$/app/models/ability.rb" />
|
||||||
<option value="$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
|
<option value="$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
|
||||||
<option value="$PROJECT_DIR$/config/routes.rb" />
|
<option value="$PROJECT_DIR$/config/routes.rb" />
|
||||||
<option value="$PROJECT_DIR$/app/models/sale.rb" />
|
|
||||||
<option value="$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb" />
|
<option value="$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb" />
|
||||||
<option value="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" />
|
<option value="$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb" />
|
||||||
<option value="$PROJECT_DIR$/.gitignore" />
|
<option value="$PROJECT_DIR$/.gitignore" />
|
||||||
|
<option value="$PROJECT_DIR$/db/migrate/20170818051922_create_commissioner.rb" />
|
||||||
|
<option value="$PROJECT_DIR$/app/models/sale.rb" />
|
||||||
|
<option value="$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
@@ -142,6 +165,7 @@
|
|||||||
<foldersAlwaysOnTop value="true" />
|
<foldersAlwaysOnTop value="true" />
|
||||||
</navigator>
|
</navigator>
|
||||||
<panes>
|
<panes>
|
||||||
|
<pane id="Scratches" />
|
||||||
<pane id="RailsProjectView" />
|
<pane id="RailsProjectView" />
|
||||||
<pane id="Scope">
|
<pane id="Scope">
|
||||||
<subPane subId="Project Files">
|
<subPane subId="Project Files">
|
||||||
@@ -157,7 +181,6 @@
|
|||||||
</PATH>
|
</PATH>
|
||||||
</subPane>
|
</subPane>
|
||||||
</pane>
|
</pane>
|
||||||
<pane id="Scratches" />
|
|
||||||
<pane id="ProjectPane">
|
<pane id="ProjectPane">
|
||||||
<subPane>
|
<subPane>
|
||||||
<PATH>
|
<PATH>
|
||||||
@@ -170,6 +193,70 @@
|
|||||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
</PATH_ELEMENT>
|
</PATH_ELEMENT>
|
||||||
</PATH>
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="lib" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="lib" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="tasks" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="db" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="db" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="migrate" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
<PATH>
|
<PATH>
|
||||||
<PATH_ELEMENT>
|
<PATH_ELEMENT>
|
||||||
<option name="myItemId" value="sxrestaurant" />
|
<option name="myItemId" value="sxrestaurant" />
|
||||||
@@ -556,18 +643,19 @@
|
|||||||
<workItem from="1498458295318" duration="2552000" />
|
<workItem from="1498458295318" duration="2552000" />
|
||||||
<workItem from="1498465879846" duration="18792000" />
|
<workItem from="1498465879846" duration="18792000" />
|
||||||
<workItem from="1502681128282" duration="12098000" />
|
<workItem from="1502681128282" duration="12098000" />
|
||||||
<workItem from="1502780405774" duration="2251000" />
|
<workItem from="1502780405774" duration="8876000" />
|
||||||
|
<workItem from="1503287439872" duration="1874000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="40110000" />
|
<option name="totallyTimeSpent" value="48609000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="1440" y="22" width="1920" height="724" extended-state="0" />
|
<frame x="1440" y="22" width="1920" height="724" extended-state="0" />
|
||||||
<editor active="true" />
|
<editor active="true" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.17518637" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1773163" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32978722" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32978722" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||||
@@ -598,11 +686,6 @@
|
|||||||
<watches-manager />
|
<watches-manager />
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/home/show.html.erb" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/rooms/show.html.erb" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/orders/show.html.erb" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/sales/show.html.erb" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/sales_controller.rb" />
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/models/sale_payment.rb" />
|
<entry file="file://$PROJECT_DIR$/app/models/sale_payment.rb" />
|
||||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
|
<entry file="file://$PROJECT_DIR$/app/controllers/origami/void_controller.rb" />
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb" />
|
<entry file="file://$PROJECT_DIR$/app/views/origami/home/index.html.erb" />
|
||||||
@@ -656,42 +739,72 @@
|
|||||||
<entry file="file://$PROJECT_DIR$/app/views/home/show.html.erb" />
|
<entry file="file://$PROJECT_DIR$/app/views/home/show.html.erb" />
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
|
<entry file="file://$PROJECT_DIR$/app/views/home/dashboard.html.erb" />
|
||||||
<entry file="file://$PROJECT_DIR$/app/models/ability.rb" />
|
<entry file="file://$PROJECT_DIR$/app/models/ability.rb" />
|
||||||
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
<entry file="file://$PROJECT_DIR$/.gitignore">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="204">
|
<state relative-caret-position="344">
|
||||||
<caret line="83" column="43" lean-forward="false" selection-start-line="83" selection-start-column="43" selection-end-line="83" selection-end-column="43" />
|
<caret line="56" column="0" lean-forward="false" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/db/migrate/20170818051922_create_commissioner.rb" />
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="218">
|
||||||
|
<caret line="38" column="17" lean-forward="true" selection-start-line="38" selection-start-column="17" selection-end-line="38" selection-end-column="17" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/models/sale.rb">
|
<entry file="file://$PROJECT_DIR$/app/models/sale.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="321">
|
<state relative-caret-position="303">
|
||||||
<caret line="270" column="45" lean-forward="true" selection-start-line="270" selection-start-column="45" selection-end-line="270" selection-end-column="45" />
|
<caret line="269" column="45" lean-forward="false" selection-start-line="269" selection-start-column="45" selection-end-line="269" selection-end-column="45" />
|
||||||
<folding />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/app/views/origami/sale_edit/edit.html.erb">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="213">
|
|
||||||
<caret line="58" column="112" lean-forward="false" selection-start-line="58" selection-start-column="112" selection-end-line="58" selection-end-column="112" />
|
|
||||||
<folding />
|
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb">
|
<entry file="file://$PROJECT_DIR$/app/controllers/origami/sale_edit_controller.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="372">
|
<state relative-caret-position="372">
|
||||||
<caret line="40" column="60" lean-forward="true" selection-start-line="40" selection-start-column="60" selection-end-line="40" selection-end-column="60" />
|
<caret line="40" column="60" lean-forward="false" selection-start-line="40" selection-start-column="60" selection-end-line="40" selection-end-column="60" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/db/migrate/20170403155230_create_employees.rb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="126">
|
||||||
|
<caret line="7" column="28" lean-forward="false" selection-start-line="7" selection-start-column="28" selection-end-line="7" selection-end-column="28" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/.gitignore">
|
<entry file="file://$PROJECT_DIR$/db/migrate/20170818090115_create_commissioners.rb">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="254">
|
<state relative-caret-position="144">
|
||||||
<caret line="51" column="8" lean-forward="true" selection-start-line="51" selection-start-column="8" selection-end-line="51" selection-end-column="8" />
|
<caret line="8" column="18" lean-forward="true" selection-start-line="8" selection-start-column="18" selection-end-line="8" selection-end-column="18" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/controllers/commissioners_controller.rb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="54">
|
||||||
|
<caret line="48" column="88" lean-forward="true" selection-start-line="48" selection-start-column="88" selection-end-line="48" selection-end-column="88" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/app/models/commissioner.rb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="0">
|
||||||
|
<caret line="0" column="38" lean-forward="true" selection-start-line="0" selection-start-column="38" selection-end-line="0" selection-end-column="38" />
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/config/routes.rb">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="126">
|
||||||
|
<caret line="83" column="43" lean-forward="false" selection-start-line="83" selection-start-column="43" selection-end-line="83" selection-end-column="43" />
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|||||||
3
app/assets/javascripts/commissioners.coffee
Normal file
3
app/assets/javascripts/commissioners.coffee
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://coffeescript.org/
|
||||||
3
app/assets/stylesheets/commissioners.scss
Normal file
3
app/assets/stylesheets/commissioners.scss
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
// Place all the styles related to the Commissioners controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||||
74
app/controllers/commissioners_controller.rb
Normal file
74
app/controllers/commissioners_controller.rb
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
class CommissionersController < ApplicationController
|
||||||
|
before_action :set_commissioner, only: [:show, :edit, :update, :destroy]
|
||||||
|
|
||||||
|
# GET /commissioners
|
||||||
|
# GET /commissioners.json
|
||||||
|
def index
|
||||||
|
@commissioners = Commissioner.all
|
||||||
|
end
|
||||||
|
|
||||||
|
# GET /commissioners/1
|
||||||
|
# GET /commissioners/1.json
|
||||||
|
def show
|
||||||
|
end
|
||||||
|
|
||||||
|
# GET /commissioners/new
|
||||||
|
def new
|
||||||
|
@commissioner = Commissioner.new
|
||||||
|
end
|
||||||
|
|
||||||
|
# GET /commissioners/1/edit
|
||||||
|
def edit
|
||||||
|
end
|
||||||
|
|
||||||
|
# POST /commissioners
|
||||||
|
# POST /commissioners.json
|
||||||
|
def create
|
||||||
|
@commissioner = Commissioner.new(commissioner_params)
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
if @commissioner.save
|
||||||
|
format.html { redirect_to @commissioner, notice: 'Commissioner was successfully created.' }
|
||||||
|
format.json { render :show, status: :created, location: @commissioner }
|
||||||
|
else
|
||||||
|
format.html { render :new }
|
||||||
|
format.json { render json: @commissioner.errors, status: :unprocessable_entity }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# PATCH/PUT /commissioners/1
|
||||||
|
# PATCH/PUT /commissioners/1.json
|
||||||
|
def update
|
||||||
|
respond_to do |format|
|
||||||
|
if @commissioner.update(commissioner_params)
|
||||||
|
format.html { redirect_to @commissioner, notice: 'Commissioner was successfully updated.' }
|
||||||
|
format.json { render :show, status: :ok, location: @commissioner }
|
||||||
|
else
|
||||||
|
format.html { render :edit }
|
||||||
|
format.json { render json: @commissioner.errors, status: :unprocessable_entity }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# DELETE /commissioners/1
|
||||||
|
# DELETE /commissioners/1.json
|
||||||
|
def destroy
|
||||||
|
@commissioner.destroy
|
||||||
|
respond_to do |format|
|
||||||
|
format.html { redirect_to commissioners_url, notice: 'Commissioner was successfully destroyed.' }
|
||||||
|
format.json { head :no_content }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
private
|
||||||
|
# Use callbacks to share common setup or constraints between actions.
|
||||||
|
def set_commissioner
|
||||||
|
@commissioner = Commissioner.find(params[:id])
|
||||||
|
end
|
||||||
|
|
||||||
|
# Never trust parameters from the scary internet, only allow the white list through.
|
||||||
|
def commissioner_params
|
||||||
|
params.fetch(:commissioner, {})
|
||||||
|
end
|
||||||
|
end
|
||||||
2
app/helpers/commissioners_helper.rb
Normal file
2
app/helpers/commissioners_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
module CommissionersHelper
|
||||||
|
end
|
||||||
2
app/models/commissioner.rb
Normal file
2
app/models/commissioner.rb
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
class Commissioner < ApplicationRecord
|
||||||
|
end
|
||||||
2
app/views/commissioners/_commissioner.json.jbuilder
Normal file
2
app/views/commissioners/_commissioner.json.jbuilder
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
json.extract! commissioner, :id, :created_at, :updated_at
|
||||||
|
json.url commissioner_url(commissioner, format: :json)
|
||||||
10
app/views/commissioners/_form.html.erb
Normal file
10
app/views/commissioners/_form.html.erb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<%= simple_form_for(@commissioner) do |f| %>
|
||||||
|
<%= f.error_notification %>
|
||||||
|
|
||||||
|
<div class="form-inputs">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-actions">
|
||||||
|
<%= f.button :submit %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
6
app/views/commissioners/edit.html.erb
Normal file
6
app/views/commissioners/edit.html.erb
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<h1>Editing Commissioner</h1>
|
||||||
|
|
||||||
|
<%= render 'form', commissioner: @commissioner %>
|
||||||
|
|
||||||
|
<%= link_to 'Show', @commissioner %> |
|
||||||
|
<%= link_to 'Back', commissioners_path %>
|
||||||
25
app/views/commissioners/index.html.erb
Normal file
25
app/views/commissioners/index.html.erb
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
<p id="notice"><%= notice %></p>
|
||||||
|
|
||||||
|
<h1>Commissioners</h1>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th colspan="3"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
<tbody>
|
||||||
|
<% @commissioners.each do |commissioner| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= link_to 'Show', commissioner %></td>
|
||||||
|
<td><%= link_to 'Edit', edit_commissioner_path(commissioner) %></td>
|
||||||
|
<td><%= link_to 'Destroy', commissioner, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<%= link_to 'New Commissioner', new_commissioner_path %>
|
||||||
1
app/views/commissioners/index.json.jbuilder
Normal file
1
app/views/commissioners/index.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
|||||||
|
json.array! @commissioners, partial: 'commissioners/commissioner', as: :commissioner
|
||||||
5
app/views/commissioners/new.html.erb
Normal file
5
app/views/commissioners/new.html.erb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<h1>New Commissioner</h1>
|
||||||
|
|
||||||
|
<%= render 'form', commissioner: @commissioner %>
|
||||||
|
|
||||||
|
<%= link_to 'Back', commissioners_path %>
|
||||||
4
app/views/commissioners/show.html.erb
Normal file
4
app/views/commissioners/show.html.erb
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<p id="notice"><%= notice %></p>
|
||||||
|
|
||||||
|
<%= link_to 'Edit', edit_commissioner_path(@commissioner) %> |
|
||||||
|
<%= link_to 'Back', commissioners_path %>
|
||||||
1
app/views/commissioners/show.json.jbuilder
Normal file
1
app/views/commissioners/show.json.jbuilder
Normal file
@@ -0,0 +1 @@
|
|||||||
|
json.partial! "commissioners/commissioner", commissioner: @commissioner
|
||||||
@@ -2,6 +2,7 @@ require 'sidekiq/web'
|
|||||||
|
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
|
|
||||||
|
resources :commissioners
|
||||||
root 'home#index'
|
root 'home#index'
|
||||||
mount Sidekiq::Web => '/kiq'
|
mount Sidekiq::Web => '/kiq'
|
||||||
|
|
||||||
|
|||||||
12
db/migrate/20170818090115_create_commissioners.rb
Normal file
12
db/migrate/20170818090115_create_commissioners.rb
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
class CreateCommissioners < ActiveRecord::Migration[5.1]
|
||||||
|
def change
|
||||||
|
create_table :commissioners do |t|
|
||||||
|
t.string :name, :null => false
|
||||||
|
t.string :emp_id
|
||||||
|
t.string :created_by
|
||||||
|
t.string :commission_type
|
||||||
|
t.boolean :is_active
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
141
spec/controllers/commissioners_controller_spec.rb
Normal file
141
spec/controllers/commissioners_controller_spec.rb
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
||||||
|
# It demonstrates how one might use RSpec to specify the controller code that
|
||||||
|
# was generated by Rails when you ran the scaffold generator.
|
||||||
|
#
|
||||||
|
# It assumes that the implementation code is generated by the rails scaffold
|
||||||
|
# generator. If you are using any extension libraries to generate different
|
||||||
|
# controller code, this generated spec may or may not pass.
|
||||||
|
#
|
||||||
|
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
||||||
|
# of tools you can use to make these specs even more expressive, but we're
|
||||||
|
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
||||||
|
#
|
||||||
|
# Compared to earlier versions of this generator, there is very limited use of
|
||||||
|
# stubs and message expectations in this spec. Stubs are only used when there
|
||||||
|
# is no simpler way to get a handle on the object needed for the example.
|
||||||
|
# Message expectations are only used when there is no simpler way to specify
|
||||||
|
# that an instance is receiving a specific message.
|
||||||
|
#
|
||||||
|
# Also compared to earlier versions of this generator, there are no longer any
|
||||||
|
# expectations of assigns and templates rendered. These features have been
|
||||||
|
# removed from Rails core in Rails 5, but can be added back in via the
|
||||||
|
# `rails-controller-testing` gem.
|
||||||
|
|
||||||
|
RSpec.describe CommissionersController, type: :controller do
|
||||||
|
|
||||||
|
# This should return the minimal set of attributes required to create a valid
|
||||||
|
# Commissioner. As you add validations to Commissioner, be sure to
|
||||||
|
# adjust the attributes here as well.
|
||||||
|
let(:valid_attributes) {
|
||||||
|
skip("Add a hash of attributes valid for your model")
|
||||||
|
}
|
||||||
|
|
||||||
|
let(:invalid_attributes) {
|
||||||
|
skip("Add a hash of attributes invalid for your model")
|
||||||
|
}
|
||||||
|
|
||||||
|
# This should return the minimal set of values that should be in the session
|
||||||
|
# in order to pass any filters (e.g. authentication) defined in
|
||||||
|
# CommissionersController. Be sure to keep this updated too.
|
||||||
|
let(:valid_session) { {} }
|
||||||
|
|
||||||
|
describe "GET #index" do
|
||||||
|
it "returns a success response" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
get :index, params: {}, session: valid_session
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "GET #show" do
|
||||||
|
it "returns a success response" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
get :show, params: {id: commissioner.to_param}, session: valid_session
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "GET #new" do
|
||||||
|
it "returns a success response" do
|
||||||
|
get :new, params: {}, session: valid_session
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "GET #edit" do
|
||||||
|
it "returns a success response" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
get :edit, params: {id: commissioner.to_param}, session: valid_session
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "POST #create" do
|
||||||
|
context "with valid params" do
|
||||||
|
it "creates a new Commissioner" do
|
||||||
|
expect {
|
||||||
|
post :create, params: {commissioner: valid_attributes}, session: valid_session
|
||||||
|
}.to change(Commissioner, :count).by(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "redirects to the created commissioner" do
|
||||||
|
post :create, params: {commissioner: valid_attributes}, session: valid_session
|
||||||
|
expect(response).to redirect_to(Commissioner.last)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context "with invalid params" do
|
||||||
|
it "returns a success response (i.e. to display the 'new' template)" do
|
||||||
|
post :create, params: {commissioner: invalid_attributes}, session: valid_session
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "PUT #update" do
|
||||||
|
context "with valid params" do
|
||||||
|
let(:new_attributes) {
|
||||||
|
skip("Add a hash of attributes valid for your model")
|
||||||
|
}
|
||||||
|
|
||||||
|
it "updates the requested commissioner" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
put :update, params: {id: commissioner.to_param, commissioner: new_attributes}, session: valid_session
|
||||||
|
commissioner.reload
|
||||||
|
skip("Add assertions for updated state")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "redirects to the commissioner" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
put :update, params: {id: commissioner.to_param, commissioner: valid_attributes}, session: valid_session
|
||||||
|
expect(response).to redirect_to(commissioner)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
context "with invalid params" do
|
||||||
|
it "returns a success response (i.e. to display the 'edit' template)" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
put :update, params: {id: commissioner.to_param, commissioner: invalid_attributes}, session: valid_session
|
||||||
|
expect(response).to be_success
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe "DELETE #destroy" do
|
||||||
|
it "destroys the requested commissioner" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
expect {
|
||||||
|
delete :destroy, params: {id: commissioner.to_param}, session: valid_session
|
||||||
|
}.to change(Commissioner, :count).by(-1)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "redirects to the commissioners list" do
|
||||||
|
commissioner = Commissioner.create! valid_attributes
|
||||||
|
delete :destroy, params: {id: commissioner.to_param}, session: valid_session
|
||||||
|
expect(response).to redirect_to(commissioners_url)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
15
spec/helpers/commissioners_helper_spec.rb
Normal file
15
spec/helpers/commissioners_helper_spec.rb
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
# Specs in this file have access to a helper object that includes
|
||||||
|
# the CommissionersHelper. For example:
|
||||||
|
#
|
||||||
|
# describe CommissionersHelper do
|
||||||
|
# describe "string concat" do
|
||||||
|
# it "concats two strings with spaces" do
|
||||||
|
# expect(helper.concat_strings("this","that")).to eq("this that")
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
# end
|
||||||
|
RSpec.describe CommissionersHelper, type: :helper do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
||||||
5
spec/models/commissioner_spec.rb
Normal file
5
spec/models/commissioner_spec.rb
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe Commissioner, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
||||||
10
spec/requests/commissioners_spec.rb
Normal file
10
spec/requests/commissioners_spec.rb
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe "Commissioners", type: :request do
|
||||||
|
describe "GET /commissioners" do
|
||||||
|
it "works! (now write some real specs)" do
|
||||||
|
get commissioners_path
|
||||||
|
expect(response).to have_http_status(200)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
39
spec/routing/commissioners_routing_spec.rb
Normal file
39
spec/routing/commissioners_routing_spec.rb
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
require "rails_helper"
|
||||||
|
|
||||||
|
RSpec.describe CommissionersController, type: :routing do
|
||||||
|
describe "routing" do
|
||||||
|
|
||||||
|
it "routes to #index" do
|
||||||
|
expect(:get => "/commissioners").to route_to("commissioners#index")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "routes to #new" do
|
||||||
|
expect(:get => "/commissioners/new").to route_to("commissioners#new")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "routes to #show" do
|
||||||
|
expect(:get => "/commissioners/1").to route_to("commissioners#show", :id => "1")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "routes to #edit" do
|
||||||
|
expect(:get => "/commissioners/1/edit").to route_to("commissioners#edit", :id => "1")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "routes to #create" do
|
||||||
|
expect(:post => "/commissioners").to route_to("commissioners#create")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "routes to #update via PUT" do
|
||||||
|
expect(:put => "/commissioners/1").to route_to("commissioners#update", :id => "1")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "routes to #update via PATCH" do
|
||||||
|
expect(:patch => "/commissioners/1").to route_to("commissioners#update", :id => "1")
|
||||||
|
end
|
||||||
|
|
||||||
|
it "routes to #destroy" do
|
||||||
|
expect(:delete => "/commissioners/1").to route_to("commissioners#destroy", :id => "1")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
14
spec/views/commissioners/edit.html.erb_spec.rb
Normal file
14
spec/views/commissioners/edit.html.erb_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe "commissioners/edit", type: :view do
|
||||||
|
before(:each) do
|
||||||
|
@commissioner = assign(:commissioner, Commissioner.create!())
|
||||||
|
end
|
||||||
|
|
||||||
|
it "renders the edit commissioner form" do
|
||||||
|
render
|
||||||
|
|
||||||
|
assert_select "form[action=?][method=?]", commissioner_path(@commissioner), "post" do
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
14
spec/views/commissioners/index.html.erb_spec.rb
Normal file
14
spec/views/commissioners/index.html.erb_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe "commissioners/index", type: :view do
|
||||||
|
before(:each) do
|
||||||
|
assign(:commissioners, [
|
||||||
|
Commissioner.create!(),
|
||||||
|
Commissioner.create!()
|
||||||
|
])
|
||||||
|
end
|
||||||
|
|
||||||
|
it "renders a list of commissioners" do
|
||||||
|
render
|
||||||
|
end
|
||||||
|
end
|
||||||
14
spec/views/commissioners/new.html.erb_spec.rb
Normal file
14
spec/views/commissioners/new.html.erb_spec.rb
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe "commissioners/new", type: :view do
|
||||||
|
before(:each) do
|
||||||
|
assign(:commissioner, Commissioner.new())
|
||||||
|
end
|
||||||
|
|
||||||
|
it "renders new commissioner form" do
|
||||||
|
render
|
||||||
|
|
||||||
|
assert_select "form[action=?][method=?]", commissioners_path, "post" do
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
11
spec/views/commissioners/show.html.erb_spec.rb
Normal file
11
spec/views/commissioners/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe "commissioners/show", type: :view do
|
||||||
|
before(:each) do
|
||||||
|
@commissioner = assign(:commissioner, Commissioner.create!())
|
||||||
|
end
|
||||||
|
|
||||||
|
it "renders attributes in <p>" do
|
||||||
|
render
|
||||||
|
end
|
||||||
|
end
|
||||||
9
test/system/commissioners_test.rb
Normal file
9
test/system/commissioners_test.rb
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
require "application_system_test_case"
|
||||||
|
|
||||||
|
class CommissionersTest < ApplicationSystemTestCase
|
||||||
|
# test "visiting the index" do
|
||||||
|
# visit commissioners_url
|
||||||
|
#
|
||||||
|
# assert_selector "h1", text: "Commissioner"
|
||||||
|
# end
|
||||||
|
end
|
||||||
Reference in New Issue
Block a user