Module: Plutonium::Testing::NestedResource

Extended by:
ActiveSupport::Concern
Includes:
AuthHelpers, DSL
Defined in:
lib/plutonium/testing/nested_resource.rb

Constant Summary

Constants included from DSL

DSL::DEFAULT_ACTIONS

Instance Method Summary collapse

Methods included from AuthHelpers

#current_account, #login_as, #sign_out, #with_portal

Methods included from DSL

#current_path_prefix, #current_portal

Instance Method Details

#create_resource!(parent:) ⇒ Object

Raises:

  • (NotImplementedError)


43
44
45
# File 'lib/plutonium/testing/nested_resource.rb', line 43

def create_resource!(parent:)
  raise NotImplementedError, "Override #create_resource!(parent:) to return a persisted record under the given parent"
end

#other_parent_record!Object

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/plutonium/testing/nested_resource.rb', line 39

def other_parent_record!
  raise NotImplementedError, "Override #other_parent_record! to return a sibling tenant"
end

#parent_record!Object

Raises:

  • (NotImplementedError)


35
36
37
# File 'lib/plutonium/testing/nested_resource.rb', line 35

def parent_record!
  raise NotImplementedError, "Override #parent_record! to return the current tenant"
end