Skip to content

Commit

Permalink
Merge pull request #563 from himdel/custom-button-set
Browse files Browse the repository at this point in the history
GenericObject spec - fix failures after core PR
  • Loading branch information
gtanzillo authored Mar 8, 2019
2 parents 272ca98 + b8572ec commit 5f19041
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions spec/requests/generic_objects_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@
it "includes the hrefs for custom buttons and button groups" do
generic_no_group = FactoryBot.create(:custom_button, :name => "generic_no_group", :applies_to_class => "GenericObject")
generic_group = FactoryBot.create(:custom_button, :name => "generic_group", :applies_to_class => "GenericObject")
generic_group_set = FactoryBot.create(:custom_button_set, :name => "generic_group_set")
generic_group_set.add_member(generic_group)
generic_group_set = FactoryBot.create(:custom_button_set, :name => "generic_group_set", :set_data => {:applies_to_class => "GenericObject", :button_order => [generic_group.id]})
assigned_no_group = FactoryBot.create(
:custom_button,
:name => "assigned_no_group",
Expand All @@ -122,8 +121,7 @@
:applies_to_class => "GenericObjectDefinition",
:applies_to_id => object_definition.id
)
assigned_group_set = FactoryBot.create(:custom_button_set, :name => "assigned_group_set")
assigned_group_set.add_member(assigned_group)
assigned_group_set = FactoryBot.create(:custom_button_set, :name => "assigned_group_set", :set_data => {:applies_to_class => "GenericObject", :button_order => [assigned_group.id]})
object_definition.update(:custom_button_sets => [assigned_group_set])
api_basic_authorize action_identifier(:generic_objects, :read, :resource_actions, :get)

Expand Down

0 comments on commit 5f19041

Please sign in to comment.