diff --git a/app/assets/javascripts/app/views/facebook/account_edit.jst.eco b/app/assets/javascripts/app/views/facebook/account_edit.jst.eco index 1e94c628d..9981427a1 100644 --- a/app/assets/javascripts/app/views/facebook/account_edit.jst.eco +++ b/app/assets/javascripts/app/views/facebook/account_edit.jst.eco @@ -2,7 +2,7 @@

<%- @T('Wall') %>

-

<%- @T('Choose which group page postings should go.') %>

+

<%- @T('Choose which group %s will get added to.', 'wall postings') %>

<%= @channel.options.user.name %>

@@ -11,7 +11,7 @@

<%- @T('Pages') %>

-

<%- @T('Choose which group page postings should go.') %>

+

<%- @T('Choose which group %s will get added to.', 'page postings') %>

<% if @channel.options.pages: %> <% for page in @channel.options.pages: %> diff --git a/app/assets/javascripts/app/views/twitter/account_edit.jst.eco b/app/assets/javascripts/app/views/twitter/account_edit.jst.eco index 20729cdfe..52f85b0e1 100644 --- a/app/assets/javascripts/app/views/twitter/account_edit.jst.eco +++ b/app/assets/javascripts/app/views/twitter/account_edit.jst.eco @@ -24,11 +24,11 @@

<%- @T('Mentions Group') %>

-

<%- @T('Choose which group mentions will get added to.') %>

+

<%- @T('Choose which group %s will get added to.', 'mentions') %>

<%- @T('Direct Messages Group') %>

-

<%- @T('Choose which group direct messages will get added to.') %>

+

<%- @T('Choose which group %s will get added to.', 'direct messages') %>

<%- @T('Retweets') %>

diff --git a/db/migrate/20170215000001_telegram_support.rb b/db/migrate/20170215000001_telegram_support.rb index 8bd689ca5..47152abe7 100644 --- a/db/migrate/20170215000001_telegram_support.rb +++ b/db/migrate/20170215000001_telegram_support.rb @@ -16,6 +16,8 @@ class TelegramSupport < ActiveRecord::Migration id: 12, name: 'telegram personal-message', communication: true, + updated_by_id: 1, + created_by_id: 1, ) end diff --git a/test/controllers/channels_controller_test.rb b/test/controllers/channels_controller_test.rb deleted file mode 100644 index 841ba56d1..000000000 --- a/test/controllers/channels_controller_test.rb +++ /dev/null @@ -1,68 +0,0 @@ -# encoding: utf-8 -require 'test_helper' - -class ChannelsControllerTest < ActionDispatch::IntegrationTest - setup do - - # set accept header - @headers = { 'ACCEPT' => 'application/json', 'CONTENT_TYPE' => 'application/json' } - - # create agent - roles = Role.where(name: %w(Admin Agent)) - groups = Group.all - - UserInfo.current_user_id = 1 - @admin = User.create_or_update( - login: 'packages-admin', - firstname: 'Packages', - lastname: 'Admin', - email: 'packages-admin@example.com', - password: 'adminpw', - active: true, - roles: roles, - groups: groups, - ) - - # create agent - roles = Role.where(name: 'Agent') - @agent = User.create_or_update( - login: 'packages-agent@example.com', - firstname: 'Rest', - lastname: 'Agent', - email: 'packages-agent@example.com', - password: 'agentpw', - active: true, - roles: roles, - groups: groups, - ) - - # create customer without org - roles = Role.where(name: 'Customer') - @customer_without_org = User.create_or_update( - login: 'packages-customer1@example.com', - firstname: 'Packages', - lastname: 'Customer1', - email: 'packages-customer1@example.com', - password: 'customer1pw', - active: true, - roles: roles, - ) - - end - - test '01 telegram_webhook creates ticket' do - json = File.read('test/fixtures/telegram/personal_message_content.json') - post '/api/v1/channels/telegram_webhook', json, @headers - puts JSON.parse(@response.body).inspect - - assert_response(200) - - result = JSON.parse(@response.body) - assert_equal(Hash, result.class) - assert_equal({ 'ok' => 'ok' }, result) - end - - test '0x telegram_webhook with existing ticket adds ticket_article' - test '0x telegram_webhook sends welcome message on /start' - test '0x telegram_webhook closes the ticket on /stop' -end