2021-12-05 20:51:47 -06:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2022-07-27 21:27:38 -05:00
|
|
|
RSpec.describe ApiKeyScope do
|
2021-12-05 20:51:47 -06:00
|
|
|
describe ".find_urls" do
|
|
|
|
it "should return the right urls" do
|
|
|
|
expect(ApiKeyScope.find_urls(actions: ["posts#create"], methods: [])).to contain_exactly(
|
|
|
|
"/posts (POST)",
|
|
|
|
)
|
|
|
|
end
|
2024-01-10 20:30:10 -06:00
|
|
|
|
|
|
|
it "should return logster urls" do
|
|
|
|
expect(ApiKeyScope.find_urls(actions: [Logster::Web], methods: [])).to contain_exactly(
|
|
|
|
"/logs/messages.json (POST)",
|
|
|
|
"/logs/show/:id.json (GET)",
|
|
|
|
)
|
|
|
|
end
|
2021-12-05 20:51:47 -06:00
|
|
|
end
|
|
|
|
end
|