Skip to content

Commit 49b8dbf

Browse files
committed
Fixture of a message with an attachment
1 parent 888271b commit 49b8dbf

File tree

6 files changed

+25
-10
lines changed

6 files changed

+25
-10
lines changed

test/controllers/messages_controller_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class MessagesControllerTest < ActionDispatch::IntegrationTest
44
setup do
5-
@message = messages(:one)
5+
@message = messages(:message1)
66
end
77

88
test "should get index" do
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
attachment2:
2+
name: attachments
3+
record_type: Message
4+
record: message2
5+
blob: blob2
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
blob2:
2+
key: 3mj2l9tdw1nb531oajdax3r7vylh
3+
filename: 1.patch
4+
content_type: text/x-diff
5+
metadata: '{"identified":true,"analyzed":true}'
6+
byte_size: 5
7+
service_name: local
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
file_blob2:
2+
key: 3mj2l9tdw1nb531oajdax3r7vylh
3+
data: Hello

test/fixtures/messages.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
22

3-
one:
4-
subject: MyString
5-
from: MyString
6-
body: MyText
3+
message1:
4+
subject: Mail1
5+
from: From1
6+
body: Body1
77
list_id: 1
88
list_seq: 123
99

10-
two:
11-
subject: MyString
12-
from: MyString
13-
body: MyText
10+
message2:
11+
subject: Mail2
12+
from: From2
13+
body: Body2
1414
list_id: 2
1515
list_seq: 234

test/system/messages_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class MessagesTest < ApplicationSystemTestCase
44
setup do
5-
@message = messages(:one)
5+
@message = messages(:message1)
66
end
77

88
test "visiting the index" do

0 commit comments

Comments
 (0)