Sha256: b94bdc658ea66eeab4d46cf2e32f4e4e3eaac4d2e59fa680bdd5e4691a650ed4
Contents?: true
Size: 690 Bytes
Versions: 7
Compression:
Stored size: 690 Bytes
Contents
# frozen_string_literal: true require "spec_helper" describe Doorkeeper::DashboardHelper do describe "#doorkeeper_errors_for" do let(:object) { double errors: { method: messages } } let(:messages) { ["first message", "second message"] } context "when object has errors" do it "returns error messages" do messages.each do |message| expect(helper.doorkeeper_errors_for(object, :method)).to include( message.capitalize, ) end end end context "when object has no errors" do it "returns nil" do expect(helper.doorkeeper_errors_for(object, :amonter_method)).to be_nil end end end end
Version data entries
7 entries across 7 versions & 2 rubygems