I set an associated role for a membership level. It works ok and sets the role to the user when they join in. However when the subscription expires it is not removed.
I checked the code and the "drop_level" method that calls on the action "membership_drop_level" is not called when a subscription is expired.
When a subscription is expired it is handled by the method "transition_through_subscription" that calls on "expire_subscription".