akkounts/spec/helpers/services_helper_spec.rb

26 lines
676 B
Ruby

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