-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add BuildResultForArchitectureComponentPreview
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/api/spec/components/previews/build_result_for_architecture_component_preview.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
class BuildResultForArchitectureComponentPreview < ViewComponent::Preview | ||
# Preview at http://HOST:PORT/rails/view_components/build_result_for_architecture_component/succeeded | ||
def succeeded | ||
result = LocalBuildResult.new( | ||
repository: '15.4', | ||
architecture: 'x86_64', | ||
code: 'succeeded', | ||
state: 'blocked', | ||
is_repository_in_db: 'true' | ||
) | ||
render(BuildResultForArchitectureComponent.new(result, 'fake_project', 'fake_package')) | ||
end | ||
|
||
# Preview at http://HOST:PORT/rails/view_components/build_result_for_architecture_component/broken | ||
def broken | ||
result = LocalBuildResult.new( | ||
repository: '15.4', | ||
architecture: 'x86_64', | ||
code: 'broken', | ||
state: 'published', | ||
is_repository_in_db: 'true', | ||
details: 'fake details' | ||
) | ||
render(BuildResultForArchitectureComponent.new(result, 'fake_project', 'fake_package')) | ||
end | ||
end |