File tree 3 files changed +12
-12
lines changed
3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 22
22
23
23
afterEach (function () {
24
24
if ($ this ->author ->image ) {
25
- Storage::disk ('public ' )->delete ('blog/ ' . $ this ->author ->image );
25
+ Storage::disk ('public ' )->delete ('blog/ ' . $ this ->author ->image );
26
26
}
27
27
});
28
28
76
76
});
77
77
78
78
test ('author edit page can be rendered ' , function () {
79
- $ response = $ this ->loggedRequest ->get ('/admin/blog-author/ ' . $ this ->author ->id . '/edit ' );
79
+ $ response = $ this ->loggedRequest ->get ('/admin/blog-author/ ' . $ this ->author ->id . '/edit ' );
80
80
81
81
$ response ->assertStatus (200 );
82
82
99
99
});
100
100
101
101
test ('author can be updated ' , function () {
102
- $ response = $ this ->loggedRequest ->put ('/admin/blog-author/ ' . $ this ->author ->id , [
102
+ $ response = $ this ->loggedRequest ->put ('/admin/blog-author/ ' . $ this ->author ->id , [
103
103
'name ' => 'New Name ' ,
104
104
105
105
]);
125
125
});
126
126
127
127
test ('author can be deleted ' , function () {
128
- $ response = $ this ->loggedRequest ->delete ('/admin/blog-author/ ' . $ this ->user ->id );
128
+ $ response = $ this ->loggedRequest ->delete ('/admin/blog-author/ ' . $ this ->user ->id );
129
129
130
130
$ response ->assertRedirect ('/admin/blog-author ' );
131
131
Original file line number Diff line number Diff line change 23
23
24
24
afterEach (function () {
25
25
if ($ this ->category ->image ) {
26
- Storage::disk ('public ' )->delete ('blog/ ' . $ this ->category ->image );
26
+ Storage::disk ('public ' )->delete ('blog/ ' . $ this ->category ->image );
27
27
}
28
28
});
29
29
75
75
});
76
76
77
77
test ('category edit page can be rendered ' , function () {
78
- $ response = $ this ->loggedRequest ->get ('/admin/blog-category/ ' . $ this ->category ->id . '/edit ' );
78
+ $ response = $ this ->loggedRequest ->get ('/admin/blog-category/ ' . $ this ->category ->id . '/edit ' );
79
79
80
80
$ response ->assertStatus (200 );
81
81
99
99
});
100
100
101
101
test ('category can be updated ' , function () {
102
- $ response = $ this ->loggedRequest ->put ('/admin/blog-category/ ' . $ this ->category ->id , [
102
+ $ response = $ this ->loggedRequest ->put ('/admin/blog-category/ ' . $ this ->category ->id , [
103
103
'name ' => 'New Name ' ,
104
104
'is_visible ' => true ,
105
105
]);
123
123
});
124
124
125
125
test ('category can be deleted ' , function () {
126
- $ response = $ this ->loggedRequest ->delete ('/admin/blog-category/ ' . $ this ->user ->id );
126
+ $ response = $ this ->loggedRequest ->delete ('/admin/blog-category/ ' . $ this ->user ->id );
127
127
128
128
$ response ->assertRedirect ('/admin/blog-category ' );
129
129
Original file line number Diff line number Diff line change 22
22
23
23
afterEach (function () {
24
24
if ($ this ->post ->image ) {
25
- Storage::disk ('public ' )->delete ('blog/ ' . $ this ->post ->image );
25
+ Storage::disk ('public ' )->delete ('blog/ ' . $ this ->post ->image );
26
26
}
27
27
});
28
28
77
77
});
78
78
79
79
test ('post edit page can be rendered ' , function () {
80
- $ response = $ this ->loggedRequest ->get ('/admin/blog-post/ ' . $ this ->post ->id . '/edit ' );
80
+ $ response = $ this ->loggedRequest ->get ('/admin/blog-post/ ' . $ this ->post ->id . '/edit ' );
81
81
82
82
$ response ->assertStatus (200 );
83
83
104
104
});
105
105
106
106
test ('post can be updated ' , function () {
107
- $ response = $ this ->loggedRequest ->put ('/admin/blog-post/ ' . $ this ->post ->id , [
107
+ $ response = $ this ->loggedRequest ->put ('/admin/blog-post/ ' . $ this ->post ->id , [
108
108
'blog_author_id ' => null ,
109
109
'blog_category_id ' => null ,
110
110
'title ' => 'New Post Title ' ,
133
133
});
134
134
135
135
test ('post can be deleted ' , function () {
136
- $ response = $ this ->loggedRequest ->delete ('/admin/blog-post/ ' . $ this ->user ->id );
136
+ $ response = $ this ->loggedRequest ->delete ('/admin/blog-post/ ' . $ this ->user ->id );
137
137
138
138
$ response ->assertRedirect ('/admin/blog-post ' );
139
139
You can’t perform that action at this time.
0 commit comments