|
90 | 90 | context "when using filter keywords from #{description}" do |
91 | 91 | let(:ransack_params) { {'fulltext_search' => keywords} } |
92 | 92 |
|
93 | | - include_examples 'shows task1' |
| 93 | + it_behaves_like 'shows task1' |
94 | 94 | end |
95 | 95 | end |
96 | 96 | end |
97 | 97 |
|
98 | 98 | context 'when a label filter is used' do |
99 | 99 | let(:ransack_params) { {'has_all_labels' => %w[l1 l3]} } |
100 | 100 |
|
101 | | - include_examples 'shows task1' |
| 101 | + it_behaves_like 'shows task1' |
102 | 102 | end |
103 | 103 |
|
104 | 104 | context 'when a fulltext search filter and label filter are combined' do |
105 | 105 | let(:ransack_params) { {'fulltext_search' => 'key1 key2', 'has_all_labels' => %w[l3]} } |
106 | 106 |
|
107 | | - include_examples 'shows task1' |
| 107 | + it_behaves_like 'shows task1' |
108 | 108 | end |
109 | 109 |
|
110 | 110 | context 'when a programming language filter is used' do |
111 | 111 | let(:ransack_params) { {'programming_language_id_in' => ruby_lang.id} } |
112 | 112 |
|
113 | | - include_examples 'shows task1' |
| 113 | + it_behaves_like 'shows task1' |
114 | 114 | end |
115 | 115 |
|
116 | 116 | context 'when a second request without searchparams is made' do |
|
984 | 984 | end |
985 | 985 | end |
986 | 986 |
|
987 | | - include_examples 'renders success response' |
| 987 | + it_behaves_like 'renders success response' |
988 | 988 |
|
989 | 989 | context 'when the account link is shared with the requesting user' do |
990 | 990 | let(:account_link) { create(:account_link, user: create(:user), shared_users: Array.wrap(user)) } |
991 | 991 |
|
992 | | - include_examples 'renders success response' |
| 992 | + it_behaves_like 'renders success response' |
993 | 993 | end |
994 | 994 |
|
995 | 995 | context 'when the account link is neither owned by nor shared with the requesting user' do |
|
1035 | 1035 | end |
1036 | 1036 | end |
1037 | 1037 |
|
1038 | | - include_examples 'renders success json' |
| 1038 | + it_behaves_like 'renders success json' |
1039 | 1039 |
|
1040 | 1040 | context 'when there is an error' do |
1041 | 1041 | let(:error) { 'error' } |
|
1070 | 1070 | context 'when the account link is shared with the requesting user' do |
1071 | 1071 | let(:account_link) { create(:account_link, user: create(:user), shared_users: Array.wrap(user)) } |
1072 | 1072 |
|
1073 | | - include_examples 'renders success json' |
| 1073 | + it_behaves_like 'renders success json' |
1074 | 1074 | end |
1075 | 1075 |
|
1076 | 1076 | context 'when the account link is neither owned by nor shared with the requesting user' do |
|
1124 | 1124 | expect { post_request }.not_to change(Task, :count) |
1125 | 1125 | end |
1126 | 1126 |
|
1127 | | - include_examples 'renders success response' |
| 1127 | + it_behaves_like 'renders success response' |
1128 | 1128 |
|
1129 | 1129 | context 'when push_type is create_new' do |
1130 | 1130 | let(:push_type) { 'create_new' } |
|
1168 | 1168 | context 'when the account link is shared with the requesting user' do |
1169 | 1169 | let(:account_link) { create(:account_link, user: create(:user), shared_users: Array.wrap(user)) } |
1170 | 1170 |
|
1171 | | - include_examples 'renders success response' |
| 1171 | + it_behaves_like 'renders success response' |
1172 | 1172 | end |
1173 | 1173 |
|
1174 | 1174 | context 'when the account link is neither owned by nor shared with the requesting user' do |
|
0 commit comments