Sha256: 38ebdbed54d9a6f1aaee2523671aaaf236359c1d70b1973d38bcb212e47fd698
Contents?: true
Size: 670 Bytes
Versions: 13
Compression:
Stored size: 670 Bytes
Contents
require 'spec_helper_integration' 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
13 entries across 13 versions & 3 rubygems