Test relationship use cases using both user objects and screen names as params
This commit is contained in:
parent
b74c64c664
commit
1e5957bfe9
|
@ -46,8 +46,8 @@ describe UseCase::Relationship::Create do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
let(:params) { base_params }
|
let(:params) { base_params }
|
||||||
let(:source_user) { user1.screen_name }
|
let(:source_user) { user1 }
|
||||||
let(:target_user) { user2.screen_name }
|
let(:target_user) { user2 }
|
||||||
let(:type) { nil }
|
let(:type) { nil }
|
||||||
|
|
||||||
# test data:
|
# test data:
|
||||||
|
@ -60,6 +60,13 @@ describe UseCase::Relationship::Create do
|
||||||
let(:type) { "follow" }
|
let(:type) { "follow" }
|
||||||
|
|
||||||
include_examples "valid relationship type"
|
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
|
end
|
||||||
|
|
||||||
context "type = 'dick'" do
|
context "type = 'dick'" do
|
||||||
|
|
|
@ -49,8 +49,8 @@ describe UseCase::Relationship::Destroy do
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
let(:params) { base_params }
|
let(:params) { base_params }
|
||||||
let(:source_user) { user1.screen_name }
|
let(:source_user) { user1 }
|
||||||
let(:target_user) { user2.screen_name }
|
let(:target_user) { user2 }
|
||||||
let(:type) { nil }
|
let(:type) { nil }
|
||||||
|
|
||||||
# test data:
|
# test data:
|
||||||
|
@ -63,6 +63,13 @@ describe UseCase::Relationship::Destroy do
|
||||||
let(:type) { "follow" }
|
let(:type) { "follow" }
|
||||||
|
|
||||||
include_examples "valid relationship type"
|
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
|
end
|
||||||
|
|
||||||
context "type = 'dick'" do
|
context "type = 'dick'" do
|
||||||
|
|
Loading…
Reference in New Issue