# language: fr

@mailman
Fonctionnalité: mettre à jour les emails inscrites à la liste ag@
  En tant que membre de Nos oignons, mon adresse email doit être inscrite
  à la liste ag@ qui correspond à l'assemblée générale. Elle doit
  également être désinscrite si je ne renouvelle pas ma cotisation.

  Scénario: Status quo
    Soit une liste ag@ avec comme emails inscrits:
      """
      pierre@example.org
      jane@example.org
      fatima@example.org
      """
    Et une base avec Pierre, à jour de cotisation
    Et avec Jane, à jour de cotisation
    Et avec Fatima, à jour de cotisation
    Lorsque j'exécute update-ag-subscribers
    Alors la liste ag@ doit avoir comme emails inscrits:
      """
      pierre@example.org
      jane@example.org
      fatima@example.org
      """

  Scénario: Nouvelle adhésion
    Soit une liste ag@ avec comme emails inscrits:
      """
      pierre@example.org
      jane@example.org
      fatima@example.org
      """
    Et une base avec Pierre, à jour de cotisation
    Et avec Jane, à jour de cotisation
    Et avec Fatima, à jour de cotisation
    Et une nouvelle adhésion de Sean
    Lorsque j'exécute update-ag-subscribers
    Alors la liste ag@ doit avoir comme emails inscrits:
      """
      pierre@example.org
      jane@example.org
      fatima@example.org
      sean@example.org
      """

  Scénario: Non renouvellement de la cotisation
    Soit une liste ag@ avec comme emails inscrits:
      """
      pierre@example.org
      jane@example.org
      fatima@example.org
      """
    Et une base avec Pierre, à jour de cotisation
    Et avec Jane qui n'a pas payé sa cotisation cette année
    Et avec Fatima, à jour de cotisation
    Lorsque j'exécute update-ag-subscribers
    Alors la liste ag@ doit avoir comme emails inscrits:
      """
      pierre@example.org
      fatima@example.org
      """

  Scénario: Un ajout et une suppression
    Soit une liste ag@ avec comme emails inscrits:
      """
      pierre@example.org
      jane@example.org
      """
    Et une base avec Pierre, à jour de cotisation
    Et avec Jane qui n'a pas payé sa cotisation cette année
    Et une nouvelle adhésion de Sean
    Lorsque j'exécute update-ag-subscribers
    Alors la liste ag@ doit avoir comme emails inscrits:
      """
      pierre@example.org
      sean@example.org
      """