Add service details config, use for known services
This commit is contained in:
25
spec/helpers/services_helper_spec.rb
Normal file
25
spec/helpers/services_helper_spec.rb
Normal file
@@ -0,0 +1,25 @@
|
||||
require 'rails_helper'
|
||||
|
||||
describe ServicesHelper do
|
||||
|
||||
describe "#service_human_name" do
|
||||
it "returns the human name when it's configured" do
|
||||
expect(service_human_name("mastodon")).to eq("Mastodon")
|
||||
end
|
||||
|
||||
it "returns the key when there is no human name" do
|
||||
expect(service_human_name("ejabberd")).to eq("ejabberd")
|
||||
end
|
||||
end
|
||||
|
||||
describe "#service_display_name" do
|
||||
it "returns the display name when it's configured" do
|
||||
expect(service_display_name("lndhub")).to eq("Lightning Network")
|
||||
end
|
||||
|
||||
it "returns the human name when there is no display name" do
|
||||
expect(service_display_name("mastodon")).to eq("Mastodon")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user