Skip to content

How do you run specs on ForestLiana collections and controllers ? #629

@jwoodrow

Description

@jwoodrow

I've been going crazy about this for about a day now and I'm at my wits' end here.

Since my Collections and Controllers have some custom fields and actions I wanted to be thorough and test them out in RSpec and for the life of me I cannot figure out how the gem does this at any point.

I've looked into the ResourceGetter, SearchQueryBuilder, ApplicationController and its serialize_model method and then into forestadmin-jsonapi-serializers and nothing seems to do the trick, I am always stuck with just my normal attributes and nil for my smart fields.

I feel like it should be "easy" and standard for a gem to be testable especially when the usage can be customized which in turn would lead to untested code.

So my question is "simple", how does one use RSpec (or any other testing library for that matter) and actually test the forest smart fields/relations/actions ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions