Uploaded image for project: 'Archive of Our Own'
  1. AO3-4916

Extend tests for complete_claim in external_authors_controller

    Details

    • Type: Improvement
    • Status: Deployed
    • Priority: Medium
    • Resolution: DeployedToBeta
    • Affects Version/s: 0.9.182
    • Fix Version/s: 0.9.185
    • Milestone:
      Internal 0.9
    • Difficulty:
      Medium
    • Roadmap:
      Misc
    • Components:
      AutomatedTests

      Description

      We'd like to extend the tests for the complete_claim method in the external authors controller to make sure that @external_author.claim! and @invitation.mark_as_redeemed have been called: https://github.com/otwcode/otwarchive/pull/2755#discussion_r104334559 ( AO3-4869 Deployed )

      How to test:

      Use Coveralls to confirm that the relevant lines are covered.

      1. Go to https://coveralls.io/github/otwcode/otwarchive?branch=master
      2. In the "Search" field near the "Source Files on Master" heading, enter the name of the controller: app/controllers/external_authors_controller.rb
      3. Click the name of the controller to view it line by line
      4. Find "def complete_claim" and ensure that the lines directly beneath it saying "@external_author.claim!" and "@invitation.mark_as_redeemed(current_user) if @invitation" are both highlighted in green

        Attachments

          Activity

            People

            • Assignee:
              redsummernight redsummernight
              Reporter:
              sarken sarken
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: