api keys: rework API key UI.
* Add an explanation of what an API key is and how to use it. * Make it possible for the site owner to view all API keys. * Remove the requirement to re-enter your password before you can view your API key (to be reworked). * Move the API key controller from maintenance/user/api_keys_controller.rb to a top level controller.
This commit is contained in:
@@ -3,14 +3,8 @@ require 'test_helper'
|
||||
class ApiKeyTest < ActiveSupport::TestCase
|
||||
context "in all cases a user" do
|
||||
setup do
|
||||
@user = FactoryBot.create(:gold_user, :name => "abcdef")
|
||||
@api_key = ApiKey.generate!(@user)
|
||||
end
|
||||
|
||||
should "regenerate the key" do
|
||||
assert_changes(-> { @api_key.key }) do
|
||||
@api_key.regenerate!
|
||||
end
|
||||
@user = create(:user)
|
||||
@api_key = create(:api_key, user: @user)
|
||||
end
|
||||
|
||||
should "generate a unique key" do
|
||||
|
||||
Reference in New Issue
Block a user