Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Commit

Permalink
Ensure SlackUser#real_name is never nil.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmycuadra committed Dec 10, 2014
1 parent c4e7352 commit a6dba8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/lita/adapters/slack/slack_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def from_data_array(users_data)
def initialize(id, name, real_name)
@id = id
@name = name
@real_name = real_name
@real_name = real_name.to_s
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/lita/adapters/slack/slack_user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
expect(subject[0].real_name).to eq('Bobby Tables')
expect(subject[1].id).to eq('U024BE7LH')
expect(subject[1].name).to eq('carl')
expect(subject[1].real_name).to be_nil
expect(subject[1].real_name).to eq('')
end
end
end

0 comments on commit a6dba8f

Please sign in to comment.