Skip to content

Commit

Permalink
Setup targets-one-parent action models test
Browse files Browse the repository at this point in the history
  • Loading branch information
newstler committed Jul 18, 2023
1 parent 869f3b8 commit 3a3cb5c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/bin/setup-action-models-system-test
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,17 @@ else
echo "Skipping the \`performs-export\` action on this CI node."
fi

if [ -z "${CIRCLE_NODE_INDEX}" ] || [ "${CIRCLE_NODE_INDEX}" == "3" ]; then
bundle exec spring rails g model Customer team:references name:string
bin/super-scaffold crud Customer Team name:text_field --sidebar="ti.ti-user"
bundle exec spring rails g model Notification customer:references text:string read:boolean
bin/super-scaffold crud Notification Customer,Team text:text_field read:boolean --sidebar="ti.ti-email"
rails db:migrate
bin/super-scaffold action-model:targets-one-parent MarkAllAsRead Notification Customer

test/bin/portable-string-replace app/models/notifications/mark_all_as_read_action.rb "# This is where you implement the operation you want to perform on the target." "customer.notifications.update(read: true)"
else
echo "Skipping the \`targets-one-parent\` action on this CI node."
fi

rails db:migrate

0 comments on commit 3a3cb5c

Please sign in to comment.