Sha256: e3859ce38dfbe1cc1952d9ebc66b9a7e2a60a50a2b68281dfa826260dbc0c8c2
Contents?: true
Size: 670 Bytes
Versions: 18
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
18 entries across 18 versions & 2 rubygems