Follow-up from "Add GET /licenses and DELETE /license/:id API"

The following discussions from !9733 (merged) should be addressed:

  • @jeremy started a discussion: (+2 comments)

    Can we consider an approach described in https://gitlab.com/gitlab-org/gitlab-ee/issues/8292? I don't know if hard-coding 1.year will always be the right option. cc @rdavila

  • @godfat started a discussion:

    What do you think about using a context to make it clear that the current user is an admin?

    context 'when the current user is an admin' do
      let(:current_user) { create(:admin) }
    
      it { is_expected.to be_allowed(:read_licenses) }
      it { is_expected.to be_allowed(:destroy_licenses) }
    end

    Not exactly important, let's do it later.

  • @godfat started a discussion:

    We don't exactly have a test to make sure that the numbers should be correct here, but I think the code looks correct and we can add the tests later anyway. At worst the number can be wrong, which I assume it won't be too harmful :P

Assignee Loading
Time tracking Loading