Fix specs.
This commit is contained in:
parent
19f04cf989
commit
d86c0cda24
8 changed files with 12 additions and 14 deletions
|
@ -93,4 +93,4 @@ end
|
|||
|
||||
require "slack_service/issue_message"
|
||||
require "slack_service/push_message"
|
||||
require "slack_service/merge_message"
|
||||
require "slack_service/merge_message"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module SlackService
|
||||
class SlackService
|
||||
class IssueMessage < BaseMessage
|
||||
attr_reader :username
|
||||
attr_reader :title
|
|
@ -1,4 +1,4 @@
|
|||
module SlackService
|
||||
class SlackService
|
||||
class MergeMessage < BaseMessage
|
||||
attr_reader :username
|
||||
attr_reader :project_name
|
|
@ -1,6 +1,4 @@
|
|||
require 'slack-notifier'
|
||||
|
||||
module SlackService
|
||||
class SlackService
|
||||
class PushMessage < BaseMessage
|
||||
attr_reader :after
|
||||
attr_reader :before
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe SlackMessages::SlackIssueMessage do
|
||||
subject { SlackMessages::SlackIssueMessage.new(args) }
|
||||
describe SlackService::IssueMessage do
|
||||
subject { SlackService::IssueMessage.new(args) }
|
||||
|
||||
let(:args) {
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe SlackMessages::SlackMergeMessage do
|
||||
subject { SlackMessages::SlackMergeMessage.new(args) }
|
||||
describe SlackService::MergeMessage do
|
||||
subject { SlackService::MergeMessage.new(args) }
|
||||
|
||||
let(:args) {
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe SlackMessages::SlackPushMessage do
|
||||
subject { SlackMessages::SlackPushMessage.new(args) }
|
||||
describe SlackService::PushMessage do
|
||||
subject { SlackService::PushMessage.new(args) }
|
||||
|
||||
let(:args) {
|
||||
{
|
||||
|
@ -31,8 +31,8 @@ describe SlackMessages::SlackPushMessage do
|
|||
)
|
||||
expect(subject.attachments).to eq([
|
||||
{
|
||||
text: "<url1|abcdefghi>: message1 - author1\n"\
|
||||
"<url2|123456789>: message2 - author2",
|
||||
text: "<url1|abcdefgh>: message1 - author1\n"\
|
||||
"<url2|12345678>: message2 - author2",
|
||||
color: color,
|
||||
}
|
||||
])
|
Loading…
Reference in a new issue