-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger doesn't fire rspec have_broadcasted_to #12
Comments
Thank you for pointing it out! @palkan, any thoughts? I have no idea for now and it will require some time to investigate. I hope I will be able to dig into it next week maybe. |
I believe this happens because we broadcast directly via AnyCable, not via
The workaround for this could be adding a Rails specific Subscriptions class, which inherits from AnyCableSubscriptions and overrides the |
Thx for feedback. Since this is in our testing, we changed our tests to make sure the trigger is getting called...
We also stubbed out the trigger call so our external CI tools didn't require redis_url |
This is because we want it to be also usable without Rails. Not sure how to fix it there at the moment. |
This
|
Describe the bug
Switched to anycable from straight up AC. Trying to convert tests and the old tests that used to pass, now fail with 0 broadcasts. The app itself works fine with updates to AnyCable.
rspec test looks like this
Trigger is called this way...
Versions
ruby: 2.6.3
rails (or other framework): 6.0.3.2
graphql: 1.11
graphql-anycable: 0.4.0
anycable: 1.0.1
GraphQL schema
GraphQL query
How do you subscribe to subscriptions?
Steps to reproduce
Create rspec test and call. You can skip the middleman with my subject.call method and just put trigger in there.
Expected behavior
have_broadcasted_to should return true
Actual behavior
Error in rspec log:
Additional context
Cable yml looks like this...
and my other config settings are per AnyCable documentation
The text was updated successfully, but these errors were encountered: