mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 18:39:52 +01:00
Test relationship use cases using both user objects and screen names as params
This commit is contained in:
parent
b74c64c664
commit
1e5957bfe9
2 changed files with 18 additions and 4 deletions
|
@ -46,8 +46,8 @@ describe UseCase::Relationship::Create do
|
|||
}
|
||||
end
|
||||
let(:params) { base_params }
|
||||
let(:source_user) { user1.screen_name }
|
||||
let(:target_user) { user2.screen_name }
|
||||
let(:source_user) { user1 }
|
||||
let(:target_user) { user2 }
|
||||
let(:type) { nil }
|
||||
|
||||
# test data:
|
||||
|
@ -60,6 +60,13 @@ describe UseCase::Relationship::Create do
|
|||
let(:type) { "follow" }
|
||||
|
||||
include_examples "valid relationship type"
|
||||
|
||||
context "using screen names" do
|
||||
let(:source_user) { user1.screen_name }
|
||||
let(:target_user) { user2.screen_name }
|
||||
|
||||
include_examples "valid relationship type"
|
||||
end
|
||||
end
|
||||
|
||||
context "type = 'dick'" do
|
||||
|
|
|
@ -49,8 +49,8 @@ describe UseCase::Relationship::Destroy do
|
|||
}
|
||||
end
|
||||
let(:params) { base_params }
|
||||
let(:source_user) { user1.screen_name }
|
||||
let(:target_user) { user2.screen_name }
|
||||
let(:source_user) { user1 }
|
||||
let(:target_user) { user2 }
|
||||
let(:type) { nil }
|
||||
|
||||
# test data:
|
||||
|
@ -63,6 +63,13 @@ describe UseCase::Relationship::Destroy do
|
|||
let(:type) { "follow" }
|
||||
|
||||
include_examples "valid relationship type"
|
||||
|
||||
context "using screen names" do
|
||||
let(:source_user) { user1.screen_name }
|
||||
let(:target_user) { user2.screen_name }
|
||||
|
||||
include_examples "valid relationship type"
|
||||
end
|
||||
end
|
||||
|
||||
context "type = 'dick'" do
|
||||
|
|
Loading…
Reference in a new issue