-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from southbridgeio/develop
Develop
- Loading branch information
Showing
4 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
# 1.7.5 | ||
|
||
* Fix problem with telegram_id exceeding int. | ||
|
||
# 1.7.4 | ||
|
||
* Bump redmine_bots dependency version | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
class ChangeTelegramIdToDecimal < Rails.version < '5.0' ? ActiveRecord::Migration : ActiveRecord::Migration[4.2] | ||
def change | ||
change_column :redmine_2fa_telegram_accounts, :telegram_id, :decimal | ||
change_column :redmine_2fa_telegram_connections, :telegram_id, :decimal | ||
change_column :users, :two_fa_id, :decimal | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
require File.expand_path('../../test_helper', __FILE__) | ||
|
||
class TelegramAuthSourceTest < ActionController::TestCase | ||
fixtures :users, :email_addresses, :roles, :auth_sources | ||
|
||
setup do | ||
@user = User.find(2) #jsmith | ||
@user.two_fa = 'telegram' | ||
@user.save | ||
end | ||
|
||
context 'telegram_id' do | ||
setup do | ||
@telegram_id = 999_999_999_999 | ||
end | ||
|
||
should 'user can handle two_fa_id above integer range' do | ||
@user.two_fa_id = @telegram_id | ||
@user.save | ||
end | ||
|
||
should 'telegram_connection can handle telegram_id above integer range' do | ||
RedmineTwoFa::TelegramConnection.create!(telegram_id: @telegram_id, user_id: @user.id) | ||
end | ||
|
||
should 'telegram_accounts can handle telegram_id above integer range' do | ||
RedmineTwoFa::TelegramAccount.create!(telegram_id: @telegram_id, user_id: @user.id) | ||
end | ||
end | ||
end |